We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fd9aaa commit 5569c0eCopy full SHA for 5569c0e
1 file changed
.github/workflows/cargo-publish.yml
@@ -70,7 +70,11 @@ jobs:
70
return
71
fi
72
73
- if cargo info --locked -q "$crate"@"$VERSION" > /dev/null; then
+ # Query crates.io from /tmp in a subshell so `cargo info` does not
74
+ # read the workspace manifest or lockfile. The subshell exits
75
+ # back to the original PWD automatically. `--locked` is omitted
76
+ # because there is no Cargo.lock in /tmp.
77
+ if (cd /tmp && cargo info -q "$crate"@"$VERSION") > /dev/null; then
78
echo "PUBLISH_${crate_env_var}=false" >> "$GITHUB_ENV"
79
echo "✅ $crate@$VERSION already exists."
80
else
0 commit comments