Skip to content

Commit 6803e83

Browse files
feat(taskfile): Verify Cargo.lock without updating dependencies (resolves #1471). (#1473)
1 parent 63e9db7 commit 6803e83

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

taskfiles/deps/lock.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,29 @@ includes:
66
tasks:
77
check-rust:
88
cmds:
9-
- task: "cargo-workspace-update"
9+
- task: "cargo-workspace-fetch"
1010
vars:
11-
CARGO_UPDATE_FLAGS: "--locked"
11+
CARGO_FETCH_FLAGS: "--locked"
1212

1313
update-rust:
1414
cmds:
1515
- task: "cargo-workspace-update"
1616
vars:
1717
CARGO_UPDATE_FLAGS: ""
1818

19+
# Runs `cargo fetch` in the root Rust workspace directory with the specified flags.
20+
#
21+
# @param {string} CARGO_FETCH_FLAGS The flags to pass to the `cargo fetch` command.
22+
cargo-workspace-fetch:
23+
internal: true
24+
requires:
25+
vars: ["CARGO_FETCH_FLAGS"]
26+
dir: "{{.ROOT_DIR}}"
27+
deps: ["toolchains:rust"]
28+
cmd: |-
29+
. "$HOME/.cargo/env"
30+
cargo fetch {{.CARGO_FETCH_FLAGS}}
31+
1932
# Runs `cargo update` in the root Rust workspace directory with the specified flags.
2033
#
2134
# @param {string} CARGO_UPDATE_FLAGS The flags to pass to the `cargo update` command.

0 commit comments

Comments
 (0)