Skip to content

Commit 85aeff4

Browse files
authored
Better help message for --enforce-lock-file (#4421)
1 parent 8b349a8 commit 85aeff4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/src/command/get.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ class GetCommand extends PubCommand {
3838
'enforce-lockfile',
3939
negatable: false,
4040
help: 'Enforce pubspec.lock. '
41-
'Fail resolution if pubspec.lock does not satisfy pubspec.yaml',
41+
'Fail `pub get` if the current `pubspec.lock` '
42+
'does not exactly specify a valid resolution of `pubspec.yaml` '
43+
'or if any content hash of a hosted package has changed.\n'
44+
'Useful for CI or deploying to production.',
4245
);
4346

4447
argParser.addFlag(

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Usage: pub get
88
-h, --help Print this usage information.
99
--[no-]offline Use cached packages instead of accessing the network.
1010
-n, --dry-run Report what dependencies would change but don't change any.
11-
--enforce-lockfile Enforce pubspec.lock. Fail resolution if pubspec.lock does not satisfy pubspec.yaml
11+
--enforce-lockfile Enforce pubspec.lock. Fail `pub get` if the current `pubspec.lock` does not exactly specify a valid resolution of `pubspec.yaml` or if any content hash of a hosted package
12+
has changed.
13+
Useful for CI or deploying to production.
1214
--[no-]precompile Build executables in immediate dependencies.
1315
-C, --directory=<dir> Run this in the directory <dir>.
1416

0 commit comments

Comments
 (0)