Thanks for the great action 🏆 we use it in one of our projects and it raises an error with the default configuration, because of caching being enabled. This happens, if your main Cargo.toml is in a sub-folder and this can be easily mitigated by leveraging the workspaces field in the Swatinem/rust-cache action.
Error
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
at ExecState._setResult (/home/runner/work/_actions/Swatinem/rust-cache/v2/dist/restore/index.js:7784:25)
at ExecState.CheckComplete (/home/runner/work/_actions/Swatinem/rust-cache/v2/dist/restore/index.js:7767:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/Swatinem/rust-cache/v2/dist/restore/index.js:7661:27)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
commandFailed: {
command: 'cargo metadata --all-features --format-version 1 --no-deps',
stderr: '\x1B[1m\x1B[31merror\x1B[0m\x1B[1m:\x1B[0m could not find `Cargo.toml` in `/home/runner/work/xyz/xyz` or any parent directory\n'
}
}
Thanks for the great action 🏆 we use it in one of our projects and it raises an error with the default configuration, because of caching being enabled. This happens, if your main
Cargo.toml
is in a sub-folder and this can be easily mitigated by leveraging theworkspaces
field in theSwatinem/rust-cache
action.Error