From 6e80ad0c9a5bc4b9dd9a311238ddab9b647cc07a Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Fri, 17 Jun 2022 14:56:32 -0400 Subject: [PATCH] Switch from .packages to package_config (#106202) --- bin/flutter.bat | 2 +- bin/internal/shared.bat | 4 ++-- bin/internal/shared.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/flutter.bat b/bin/flutter.bat index 06c9a353c9..87bfde7175 100644 --- a/bin/flutter.bat +++ b/bin/flutter.bat @@ -51,4 +51,4 @@ REM REM Do not use the CALL command in the next line to execute Dart. CALL causes REM Windows to re-read the line from disk after the CALL command has finished REM regardless of the ampersand chain. -"%dart%" --disable-dart-dev --packages="%flutter_tools_dir%\.packages" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %* & exit /B !ERRORLEVEL! +"%dart%" --disable-dart-dev --packages="%flutter_tools_dir%\.dart_tool\package_config.json" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %* & exit /B !ERRORLEVEL! diff --git a/bin/internal/shared.bat b/bin/internal/shared.bat index 05cbac1c9f..29456f5b4f 100644 --- a/bin/internal/shared.bat +++ b/bin/internal/shared.bat @@ -163,9 +163,9 @@ GOTO :after_subroutine POPD IF "%FLUTTER_TOOL_ARGS%" == "" ( - "%dart%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" --no-enable-mirrors "%script_path%" + "%dart%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.dart_tool\package_config.json" --no-enable-mirrors "%script_path%" ) else ( - "%dart%" "%FLUTTER_TOOL_ARGS%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%" + "%dart%" "%FLUTTER_TOOL_ARGS%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.dart_tool\package_config.json" "%script_path%" ) IF "%ERRORLEVEL%" NEQ "0" ( ECHO Error: Unable to create dart snapshot for flutter tool. 1>&2 diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh index f38522959e..ab746724e9 100644 --- a/bin/internal/shared.sh +++ b/bin/internal/shared.sh @@ -155,7 +155,7 @@ function upgrade_flutter () ( pub_upgrade_with_retry # Compile... - "$DART" --verbosity=error --disable-dart-dev $FLUTTER_TOOL_ARGS --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" --no-enable-mirrors "$SCRIPT_PATH" + "$DART" --verbosity=error --disable-dart-dev $FLUTTER_TOOL_ARGS --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" --no-enable-mirrors "$SCRIPT_PATH" echo "$compilekey" > "$STAMP_PATH" fi # The exit here is extraneous since the function is run in a subshell, but @@ -222,7 +222,7 @@ function shared::execute() { flutter*) # FLUTTER_TOOL_ARGS aren't quoted below, because it is meant to be # considered as separate space-separated args. - exec "$DART" --disable-dart-dev --packages="$FLUTTER_TOOLS_DIR/.packages" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@" + exec "$DART" --disable-dart-dev --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@" ;; dart*) exec "$DART" "$@"