Skip to content

Commit cb4e299

Browse files
authored
Rollup merge of rust-lang#116292 - onur-ozkan:warn-wrong-sources, r=clubby789
warn if source is not either a git clone or a dist tarball When the repository is downloaded directly via HTTP(as in rust-lang#115041), builds may fail due to missing submodules. This PR adds a check that warns people in such cases.
2 parents 7c3eeb9 + 88e7718 commit cb4e299

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/bootstrap.py

+6
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,12 @@ def bootstrap(args):
10421042
"""Configure, fetch, build and run the initial bootstrap"""
10431043
rust_root = os.path.abspath(os.path.join(__file__, '../../..'))
10441044

1045+
if not os.path.exists(os.path.join(rust_root, '.git')) and \
1046+
os.path.exists(os.path.join(rust_root, '.github')):
1047+
eprint("warn: Looks like you are trying to bootstrap Rust from a source that is neither a "
1048+
"git clone nor distributed tarball.\nThis build may fail due to missing submodules "
1049+
"unless you put them in place manually.")
1050+
10451051
# Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config.toml`,
10461052
# then `config.toml` in the root directory.
10471053
toml_path = args.config or os.getenv('RUST_BOOTSTRAP_CONFIG')

0 commit comments

Comments
 (0)