Skip to content
New issue

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

Cannot cargo new in the root directory. #7049

Closed
ehuss opened this issue Jun 20, 2019 · 4 comments
Closed

Cannot cargo new in the root directory. #7049

ehuss opened this issue Jun 20, 2019 · 4 comments
Labels

Comments

@ehuss
Copy link
Contributor

ehuss commented Jun 20, 2019

Problem
cargo new in the root directory of a posix-like system (linux or macos) will fail with:

failed to make directory '/foo/.git': No such file or directory; class=Os (2)

Notes

cargo 1.37.0-nightly (807429e 2019-06-11)

This is caused by the update to libgit2, see libgit2/libgit2#5130 for more details.

@RalfJung
Copy link
Member

RalfJung commented Jul 1, 2019

This currently blocks playground from updating to latest nightlies.

@nukeop
Copy link

nukeop commented Jul 10, 2019

I'm also experiencing this issue, reproducible with the following dockerfile:

FROM rust:latest

RUN USER=root cargo new --bin test

@shepmaster
Copy link
Member

The workaround we did for the playground:

RUN cd / && \
    mkdir -p playground && \
    cargo init playground

bors added a commit that referenced this issue Jul 12, 2019
[BETA] Fix `cargo new` in root directory.

A temporary fix for #7049, master/nightly will (eventually) get the fix by updating libgit2.
bors added a commit that referenced this issue Jul 12, 2019
[BETA] Fix `cargo new` in root directory.

A temporary fix for #7049, master/nightly will (eventually) get the fix by updating libgit2.
Tarnadas added a commit to Tarnadas/smmdb that referenced this issue Aug 8, 2019
@ehuss
Copy link
Contributor Author

ehuss commented Oct 30, 2019

This was fixed a while ago, closing.

@ehuss ehuss closed this as completed Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants