Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c4e1a1b3
Unverified
Commit
c4e1a1b3
authored
Aug 25, 2023
by
Ian Hickson
Committed by
GitHub
Aug 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix locking to work with flutter and dart running simultaneously (#133350)
parent
347f7bac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
dart
bin/dart
+2
-1
flutter
bin/flutter
+2
-1
shared.sh
bin/internal/shared.sh
+17
-1
No files found.
bin/dart
View file @
c4e1a1b3
...
...
@@ -45,6 +45,7 @@ function follow_links() (
PROG_NAME
=
"
$(
follow_links
"
${
BASH_SOURCE
[0]
}
"
)
"
BIN_DIR
=
"
$(
cd
"
${
PROG_NAME
%/*
}
"
;
pwd
-P
)
"
SHARED_NAME
=
"
$BIN_DIR
/internal/shared.sh"
OS
=
"
$(
uname
-s
)
"
# If we're on Windows, invoke the batch script instead to get proper locking.
...
...
@@ -53,6 +54,6 @@ if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* || $OS =~ MSYS.* ]]; then
fi
# To define `shared::execute()` function
source
"
$
BIN_DIR
/internal/shared.sh
"
source
"
$
SHARED_NAME
"
shared::execute
"
$@
"
bin/flutter
View file @
c4e1a1b3
...
...
@@ -50,6 +50,7 @@ function follow_links() (
PROG_NAME
=
"
$(
follow_links
"
${
BASH_SOURCE
[0]
}
"
)
"
BIN_DIR
=
"
$(
cd
"
${
PROG_NAME
%/*
}
"
;
pwd
-P
)
"
SHARED_NAME
=
"
$BIN_DIR
/internal/shared.sh"
OS
=
"
$(
uname
-s
)
"
# If we're on Windows, invoke the batch script instead to get proper locking.
...
...
@@ -58,6 +59,6 @@ if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* || $OS =~ MSYS.* ]]; then
fi
# To define `shared::execute()` function
source
"
$
BIN_DIR
/internal/shared.sh
"
source
"
$
SHARED_NAME
"
shared::execute
"
$@
"
bin/internal/shared.sh
View file @
c4e1a1b3
...
...
@@ -229,7 +229,23 @@ function shared::execute() {
exit
1
fi
upgrade_flutter 7<
"
$PROG_NAME
"
# File descriptor 7 is prepared here so that we can use it with
# flock(1) in _lock() (see above).
#
# We use number 7 because it's a luckier number than 3; luck is
# important when making locks work reliably. Also because that way
# if anyone is redirecting other file descriptors there's less
# chance of a conflict.
#
# In any case, the file we redirect into this file descriptor is
# this very source file you are reading right now, because that's
# the only file we can truly guarantee exists, since we're running
# it. We don't use PROG_NAME because otherwise if you run `dart` and
# `flutter` simultaneously they'll end up using different lock files
# and will corrupt each others' downloads.
#
# SHARED_NAME itself is prepared by the caller script.
upgrade_flutter 7<
"
$SHARED_NAME
"
BIN_NAME
=
"
$(
basename
"
$PROG_NAME
"
)
"
case
"
$BIN_NAME
"
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment