Skip to content

Commit 4f634ed

Browse files
authored
Unhide the --example flag for relevant commands (#4633)
1 parent 619db73 commit 4f634ed

File tree

10 files changed

+10
-5
lines changed

10 files changed

+10
-5
lines changed

lib/src/command/add.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ For example (follow the same format including spaces):
167167
defaultsTo: true,
168168
help:
169169
'Also update dependencies in `example/` after modifying pubspec.yaml in the root package (if it exists).',
170-
hide: true,
171170
);
172171
}
173172

lib/src/command/downgrade.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class DowngradeCommand extends PubCommand {
4848
'example',
4949
defaultsTo: true,
5050
help: 'Also run in `example/` (if it exists).',
51-
hide: true,
5251
);
5352

5453
argParser.addOption(

lib/src/command/get.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class GetCommand extends PubCommand {
5656
'example',
5757
defaultsTo: true,
5858
help: 'Also run in `example/` (if it exists).',
59-
hide: true,
6059
);
6160

6261
argParser.addOption(

lib/src/command/remove.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ To remove a dependency override of a package prefix the package name with
5959
'example',
6060
defaultsTo: true,
6161
help: 'Also update dependencies in `example/` (if it exists).',
62-
hide: true,
6362
);
6463

6564
argParser.addOption(

lib/src/command/upgrade.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ class UpgradeCommand extends PubCommand {
8989
'example',
9090
defaultsTo: true,
9191
help: 'Also run in `example/` (if it exists).',
92-
hide: true,
9392
);
9493

9594
argParser.addOption(

test/testdata/goldens/help_test/pub add --help.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Usage: pub add [options] [<section>:]<package>[:descriptor] [<section>:]<package
4343
-n, --dry-run Report what dependencies would change but don't change any.
4444
--[no-]precompile Build executables in immediate dependencies.
4545
-C, --directory=<dir> Run this in the directory <dir>.
46+
--[no-]example Also update dependencies in `example/` after modifying pubspec.yaml in the root package (if it exists).
47+
(defaults to on)
4648

4749
Run "pub help" to see global options.
4850
See https://dart.dev/tools/pub/cmd/pub-add for detailed documentation.

test/testdata/goldens/help_test/pub downgrade --help.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Usage: pub downgrade [dependencies...]
1010
-h, --help Print this usage information.
1111
--[no-]offline Use cached packages instead of accessing the network.
1212
-n, --dry-run Report what dependencies would change but don't change any.
13+
--[no-]example Also run in `example/` (if it exists).
14+
(defaults to on)
1315
-C, --directory=<dir> Run this in the directory <dir>.
1416
--tighten Updates lower bounds in pubspec.yaml to match the resolved version.
1517

test/testdata/goldens/help_test/pub get --help.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Usage: pub get
1212
has changed.
1313
Useful for CI or deploying to production.
1414
--[no-]precompile Build executables in immediate dependencies.
15+
--[no-]example Also run in `example/` (if it exists).
16+
(defaults to on)
1517
-C, --directory=<dir> Run this in the directory <dir>.
1618

1719
Run "pub help" to see global options.

test/testdata/goldens/help_test/pub remove --help.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Usage: pub remove <package1> [<package2>...]
1616
--[no-]offline Use cached packages instead of accessing the network.
1717
-n, --dry-run Report what dependencies would change but don't change any.
1818
--[no-]precompile Precompile executables in immediate dependencies.
19+
--[no-]example Also update dependencies in `example/` (if it exists).
20+
(defaults to on)
1921
-C, --directory=<dir> Run this in the directory <dir>.
2022

2123
Run "pub help" to see global options.

test/testdata/goldens/help_test/pub upgrade --help.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Usage: pub upgrade [dependencies...]
1212
--tighten Updates lower bounds in pubspec.yaml to match the resolved version.
1313
--unlock-transitive Also upgrades the transitive dependencies of the listed [dependencies]
1414
--major-versions Upgrades packages to their latest resolvable versions, and updates pubspec.yaml.
15+
--[no-]example Also run in `example/` (if it exists).
16+
(defaults to on)
1517
-C, --directory=<dir> Run this in the directory <dir>.
1618

1719
Run "pub help" to see global options.

0 commit comments

Comments
 (0)