We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo add
ctrl + c
I hit ctrl+c when cancelling a redundant cargo add command, and discovered that my Cargo.toml had been entirely deleted.
ctrl+c
No response
cargo version --verbose cargo 1.65.0 (4bc8f24d3 2022-10-20) release: 1.65.0 commit-hash: 4bc8f24d3e899462e43621aab981f6383a370365 commit-date: 2022-10-20 host: x86_64-unknown-linux-gnu libgit2: 1.5.0 (sys:0.15.0 vendored) libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q) os: CentOS 7.9.2009 (Core) [64-bit]
The text was updated successfully, but these errors were encountered:
We are using std::fs::write, so the scope of this race condition is very small. Resolving this completely would require an atomic write.
std::fs::write
Sorry, something went wrong.
Could it not write to a temporary file and then atomically replace the original?
Yes, that was what I was referring to at the end.
9a94183
Successfully merging a pull request may close this issue.
Problem
I hit
ctrl+c
when cancelling a redundantcargo add
command, and discovered that my Cargo.toml had been entirely deleted.Steps
cargo add
a cratectrl+c
before it finishes successfullyPossible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: