From 09d3c97ec0554836579a390cb1ad78d53d775b7b Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Wed, 4 Jun 2025 09:43:28 -0500 Subject: [PATCH] fix: shorebird install/upgrade workspace support (#3144) --- third_party/flutter/bin/internal/shared.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/flutter/bin/internal/shared.sh b/third_party/flutter/bin/internal/shared.sh index 6233e7e6..af78ccaf 100755 --- a/third_party/flutter/bin/internal/shared.sh +++ b/third_party/flutter/bin/internal/shared.sh @@ -129,7 +129,7 @@ function upgrade_shorebird () ( # * STAMP_PATH is an empty file, or # * Contents of STAMP_PATH is not what we are going to compile, or # * pubspec.yaml last modified after pubspec.lock - if [[ ! -f "$SNAPSHOT_PATH" || ! -s "$STAMP_PATH" || "$(cat "$STAMP_PATH")" != "$compilekey" || "$SHOREBIRD_CLI_DIR/pubspec.yaml" -nt "$SHOREBIRD_CLI_DIR/pubspec.lock" ]]; then + if [[ ! -f "$SNAPSHOT_PATH" || ! -s "$STAMP_PATH" || "$(cat "$STAMP_PATH")" != "$compilekey" || "$SHOREBIRD_CLI_DIR/pubspec.yaml" -nt "$SHOREBIRD_ROOT/pubspec.lock" ]]; then # Waits for the update lock to be acquired. Placing this check inside the # conditional allows the majority of flutter/dart installations to bypass # the lock entirely, but as a result this required a second verification that @@ -137,7 +137,7 @@ function upgrade_shorebird () ( _wait_for_lock # A different shell process might have updated the tool/SDK. - if [[ -f "$SNAPSHOT_PATH" && -s "$STAMP_PATH" && "$(cat "$STAMP_PATH")" == "$compilekey" && "$SHOREBIRD_CLI_DIR/pubspec.yaml" -ot "$SHOREBIRD_CLI_DIR/pubspec.lock" ]]; then + if [[ -f "$SNAPSHOT_PATH" && -s "$STAMP_PATH" && "$(cat "$STAMP_PATH")" == "$compilekey" && "$SHOREBIRD_CLI_DIR/pubspec.yaml" -ot "$SHOREBIRD_ROOT/pubspec.lock" ]]; then exit $? fi @@ -165,7 +165,7 @@ function upgrade_shorebird () ( fi # Compile... - $DART_PATH --verbosity=error --disable-dart-dev --snapshot="$SNAPSHOT_PATH" --snapshot-kind="app-jit" --packages="$SHOREBIRD_CLI_DIR/.dart_tool/package_config.json" --no-enable-mirrors "$SCRIPT_PATH" > /dev/null + $DART_PATH --verbosity=error --disable-dart-dev --snapshot="$SNAPSHOT_PATH" --snapshot-kind="app-jit" --packages="$SHOREBIRD_ROOT/.dart_tool/package_config.json" --no-enable-mirrors "$SCRIPT_PATH" > /dev/null echo "$compilekey" > "$STAMP_PATH" # Delete any temporary snapshot path.