Skip to content

Commit

Permalink
Use --locked in docs for how to install libcnb-cargo (#734)
Browse files Browse the repository at this point in the history
By default `cargo install` will not use any lockfile in the published
crate, and instead will install the latest in-range version of any
transitive dependencies.

By using `--locked` the lockfile will be used, ensuring a more
deterministic installation.

Note: Whilst this repo intentionally doesn't commit a lockfile to
Git (since this is a library crate), Cargo will include one in the
crate uploaded to crates.io at time of publish, so `--locked` will
still work.

See:
https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile
  • Loading branch information
edmorley authored Nov 15, 2023
1 parent 1c948b4 commit cbf08bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Start by installing [libcnb-cargo](https://crates.io/crates/libcnb-cargo), which
that we will use later to package our buildpack:

```shell
cargo install libcnb-cargo
cargo install --locked libcnb-cargo
```

#### Cross-compilation prerequisites
Expand Down
2 changes: 1 addition & 1 deletion libcnb-cargo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A Cargo command for managing buildpacks written with [libcnb.rs](https://github.
## Installation

```shell
cargo install libcnb-cargo
cargo install --locked libcnb-cargo
```

## Usage
Expand Down

0 comments on commit cbf08bf

Please sign in to comment.