You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/src/command/downgrade.dart
+18-12Lines changed: 18 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -80,21 +80,27 @@ class DowngradeCommand extends PubCommand {
80
80
unlock: argResults.rest,
81
81
dryRun: _dryRun,
82
82
);
83
-
final example = entrypoint.example;
84
-
if (argResults.flag('example') && example !=null) {
85
-
await example.acquireDependencies(
86
-
SolveType.get,
87
-
unlock: argResults.rest,
88
-
dryRun: _dryRun,
89
-
summaryOnly:true,
90
-
);
83
+
if (_example) {
84
+
for (final example in entrypoint.examples) {
85
+
await example.acquireDependencies(
86
+
SolveType.get,
87
+
unlock: argResults.rest,
88
+
dryRun: _dryRun,
89
+
summaryOnly:true,
90
+
);
91
+
}
91
92
}
92
93
93
94
if (_tighten) {
94
-
if (_example && entrypoint.example !=null) {
95
-
log.warning(
96
-
'Running `downgrade --tighten` only in `${entrypoint.workspaceRoot.dir}`. Run `$topLevelProgram pub upgrade --tighten --directory example/` separately.',
Copy file name to clipboardExpand all lines: lib/src/command/upgrade.dart
+23-13Lines changed: 23 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -154,31 +154,41 @@ Consider using the Dart 2.19 sdk to migrate to null safety.''');
154
154
}
155
155
156
156
if (_upgradeMajorVersions) {
157
-
if (argResults.flag('example') && entrypoint.example !=null) {
158
-
log.warning(
159
-
'Running `upgrade --major-versions` only in `${entrypoint.workspaceRoot.dir}`. Run `$topLevelProgram pub upgrade --major-versions --directory example/` separately.',
if (argResults.flag('example') && entrypoint.example !=null) {
167
-
log.warning(
168
-
'Running `upgrade --tighten` only in `${entrypoint.workspaceRoot.dir}`. Run `$topLevelProgram pub upgrade --tighten --directory example/` separately.',
Copy file name to clipboardExpand all lines: test/testdata/goldens/upgrade/example_warns_about_major_versions_test/pub upgrade --major-versions does not update major versions in example~.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Changed 1 dependency!
12
12
Resolving dependencies in `./example`...
13
13
Downloading packages...
14
14
Got dependencies in `./example`.
15
-
[STDERR] Running `upgrade --major-versions` only in `.`. Run `dart pub upgrade --major-versions --directory example/` separately.
15
+
[STDERR] Running `upgrade --major-versions` only in `.`. Run `dart pub upgrade --major-versions --directory ./example` separately.
16
16
17
17
-------------------------------- END OF OUTPUT ---------------------------------
0 commit comments