Skip to content

cargo add on a full disk results in Cargo.toml becoming empty #12704

Closed
@rustrust

Description

I ran cargo add on a disk which was already full and this resulted in my Cargo.toml becoming an empty file.

$ rustc --version
rustc 1.72.0 (5680fa18f 2023-08-23)
$ cargo --version
cargo 1.72.0 (103a7ff2e 2023-08-15)
$ cargo add clap --features derive
    Updating crates.io index
      Adding clap v4.4.4 to dependencies.
             Features:
             + color
             + derive
             + error-context
             + help
             + std
             + suggestions
             + usage
             - cargo
             - debug
             - deprecated
             - env
             - string
             - unicode
             - unstable-doc
             - unstable-styles
             - unstable-v5
             - wrap_help
error: failed to write `/myproject/Cargo.toml`

Caused by:
  No space left on device (os error 28)

After this Cargo.toml is a blank file!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-addS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions