Skip to content

Commit

Permalink
Better help message for --enforce-lock-file (#4421)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdm authored Nov 14, 2024
1 parent 8b349a8 commit 85aeff4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/src/command/get.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class GetCommand extends PubCommand {
'enforce-lockfile',
negatable: false,
help: 'Enforce pubspec.lock. '
'Fail resolution if pubspec.lock does not satisfy pubspec.yaml',
'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 has changed.\n'
'Useful for CI or deploying to production.',
);

argParser.addFlag(
Expand Down
4 changes: 3 additions & 1 deletion test/testdata/goldens/help_test/pub get --help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Usage: pub get
-h, --help Print this usage information.
--[no-]offline Use cached packages instead of accessing the network.
-n, --dry-run Report what dependencies would change but don't change any.
--enforce-lockfile Enforce pubspec.lock. Fail resolution if pubspec.lock does not satisfy pubspec.yaml
--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
has changed.
Useful for CI or deploying to production.
--[no-]precompile Build executables in immediate dependencies.
-C, --directory=<dir> Run this in the directory <dir>.

Expand Down

0 comments on commit 85aeff4

Please sign in to comment.