Skip to content

Fatal error when running ./x.py test without .git directory #70182

Closed
@alexreg

Description

@alexreg

When running ./x.py test without a Git repo (i.e., no .git directory), I get the following:

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
thread 'main' panicked at 'command did not execute successfully: "git" "status" "--porcelain" "--untracked-files=normal"
expected success, got: exit code: 128', src/build_helper/lib.rs:131:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to run: /home/alexreg/src/rust-devel/fix-trait-aliases-in-objects/build/bootstrap/debug/bootstrap -i --keep-stage 0 test
Build completed unsuccessfully in 0:00:01

Apparently this is due to tidy/rustfmt. (Thanks to @Mark-Simulacrum for this suggestion.) So, if I add --exclude src/tools/tidy to the command line, it all works. However, it would be nice if it could handle no .git directory automatically.

CC @pnkfelix

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions