Skip to content

Commit 5d6eddf

Browse files
committed
Switch "flutter packages" to "flutter pub"
See #2322.
1 parent 1d1fb70 commit 5d6eddf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/extension/commands/sdk.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class SdkCommands {
6161
uri = vs.Uri.file(uri);
6262
try {
6363
if (util.isInsideFlutterProject(uri))
64-
return this.runFlutter(["packages", "get"], uri);
64+
return this.runFlutter(["pub", "get"], uri);
6565
else
6666
return this.runPub(["get"], uri);
6767
} finally {
@@ -76,7 +76,7 @@ export class SdkCommands {
7676
if (typeof uri === "string")
7777
uri = vs.Uri.file(uri);
7878
if (util.isInsideFlutterProject(uri))
79-
return this.runFlutter(["packages", "upgrade"], uri);
79+
return this.runFlutter(["pub", "upgrade"], uri);
8080
else
8181
return this.runPub(["upgrade"], uri);
8282
}));
@@ -104,7 +104,7 @@ export class SdkCommands {
104104
}
105105

106106
try {
107-
return this.runFlutter(["packages", "get"], selection);
107+
return this.runFlutter(["pub", "get"], selection);
108108
} finally {
109109
// TODO: Move this to a reusable event.
110110
DartHoverProvider.clearPackageMapCaches();

‎src/extension/pub/build_runner_task_provider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class PubBuildRunnerTaskProvider implements vs.TaskProvider {
3232
const isFlutter = util.isFlutterWorkspaceFolder(folder) && this.sdks.flutter;
3333
const type = isFlutter ? "flutter" : "pub";
3434
const program = isFlutter ? path.join(this.sdks.flutter!, flutterPath) : path.join(this.sdks.dart!, pubPath);
35-
const args = isFlutter ? ["packages", "pub", "run", "build_runner", subCommand] : ["run", "build_runner", subCommand];
35+
const args = isFlutter ? ["pub", "run", "build_runner", subCommand] : ["run", "build_runner", subCommand];
3636
if (config.buildRunnerAdditionalArgs) {
3737
args.push(...config.buildRunnerAdditionalArgs);
3838
}

0 commit comments

Comments
 (0)