Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better help message for --enforce-lock-file #4421

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
20 changes: 10 additions & 10 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: c57b02f47e021c9d7ced6d2e28824b315e0fd585578274bc4c2a5db0626f154a
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
url: "https://pub.dev"
source: hosted
version: "75.0.0"
version: "73.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.3"
version: "0.3.2"
analyzer:
dependency: "direct main"
description:
name: analyzer
sha256: ef226c581b7cd875f734125b1b9928df3db08cc85ff87ce7d9be89a677aaee23
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
url: "https://pub.dev"
source: hosted
version: "6.10.0"
version: "6.8.0"
args:
dependency: "direct main"
description:
Expand Down Expand Up @@ -178,10 +178,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "4a16b3f03741e1252fda5de3ce712666d010ba2122f8e912c94f9f7b90e1a4c3"
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
url: "https://pub.dev"
source: hosted
version: "5.1.0"
version: "5.0.0"
logging:
dependency: transitive
description:
Expand All @@ -194,10 +194,10 @@ packages:
dependency: transitive
description:
name: macros
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
url: "https://pub.dev"
source: hosted
version: "0.1.3-main.0"
version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -479,4 +479,4 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=3.6.0-0 <4.0.0"
dart: ">=3.5.0 <4.0.0"
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