Skip to content

Commit 6e80ad0

Browse files
authored
Switch from .packages to package_config (#106202)
1 parent 40516e3 commit 6e80ad0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/flutter.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ REM
5151
REM Do not use the CALL command in the next line to execute Dart. CALL causes
5252
REM Windows to re-read the line from disk after the CALL command has finished
5353
REM regardless of the ampersand chain.
54-
"%dart%" --disable-dart-dev --packages="%flutter_tools_dir%\.packages" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %* & exit /B !ERRORLEVEL!
54+
"%dart%" --disable-dart-dev --packages="%flutter_tools_dir%\.dart_tool\package_config.json" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %* & exit /B !ERRORLEVEL!

bin/internal/shared.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ GOTO :after_subroutine
163163
POPD
164164

165165
IF "%FLUTTER_TOOL_ARGS%" == "" (
166-
"%dart%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" --no-enable-mirrors "%script_path%"
166+
"%dart%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.dart_tool\package_config.json" --no-enable-mirrors "%script_path%"
167167
) else (
168-
"%dart%" "%FLUTTER_TOOL_ARGS%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%"
168+
"%dart%" "%FLUTTER_TOOL_ARGS%" --verbosity=error --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.dart_tool\package_config.json" "%script_path%"
169169
)
170170
IF "%ERRORLEVEL%" NEQ "0" (
171171
ECHO Error: Unable to create dart snapshot for flutter tool. 1>&2

bin/internal/shared.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function upgrade_flutter () (
155155
pub_upgrade_with_retry
156156

157157
# Compile...
158-
"$DART" --verbosity=error --disable-dart-dev $FLUTTER_TOOL_ARGS --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" --no-enable-mirrors "$SCRIPT_PATH"
158+
"$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"
159159
echo "$compilekey" > "$STAMP_PATH"
160160
fi
161161
# The exit here is extraneous since the function is run in a subshell, but
@@ -222,7 +222,7 @@ function shared::execute() {
222222
flutter*)
223223
# FLUTTER_TOOL_ARGS aren't quoted below, because it is meant to be
224224
# considered as separate space-separated args.
225-
exec "$DART" --disable-dart-dev --packages="$FLUTTER_TOOLS_DIR/.packages" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"
225+
exec "$DART" --disable-dart-dev --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"
226226
;;
227227
dart*)
228228
exec "$DART" "$@"

0 commit comments

Comments
 (0)