Skip to content

Commit

Permalink
Refer to package guide from command reference section about `--enforc…
Browse files Browse the repository at this point in the history
…e-lockfile` (#6192)

Follow-up to #6108

dart-lang/pub#4093

---------

Co-authored-by: Marya <[email protected]>
  • Loading branch information
sigurdm and MaryaBelanger authored Nov 7, 2024
1 parent 9bbda4d commit 00af1e9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/content/tools/pub/cmd/pub-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,15 @@ To prevent precompilation, use `--no-precompile`.

### `--enforce-lockfile`

Refuses to resolve dependencies with an error message
if the `pubspec.lock` file deviates or is missing.
Enforce the resolution of the current `pubspec.lock`.

Fail the `pub get` with an error message if the `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.

Read [Get dependencies for production](/guides/packages#get-dependencies-for-production)
for more details.

{% render 'pub-problems.md' %}

0 comments on commit 00af1e9

Please sign in to comment.