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`
  • Loading branch information
sigurdm committed Nov 5, 2024
1 parent 6014374 commit a61a141
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.

See this [section](/guides/packages#get-dependencies-for-production) for more
details.

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

0 comments on commit a61a141

Please sign in to comment.