Skip to content

Commit 88e7718

Browse files
committed
warn if source is not either a git clone or a dist tarball
Signed-off-by: onur-ozkan <[email protected]>
1 parent bf98263 commit 88e7718

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
@@ -1048,6 +1048,12 @@ def bootstrap(args):
10481048
"""Configure, fetch, build and run the initial bootstrap"""
10491049
rust_root = os.path.abspath(os.path.join(__file__, '../../..'))
10501050

1051+
if not os.path.exists(os.path.join(rust_root, '.git')) and \
1052+
os.path.exists(os.path.join(rust_root, '.github')):
1053+
eprint("warn: Looks like you are trying to bootstrap Rust from a source that is neither a "
1054+
"git clone nor distributed tarball.\nThis build may fail due to missing submodules "
1055+
"unless you put them in place manually.")
1056+
10511057
# Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config.toml`,
10521058
# then `config.toml` in the root directory.
10531059
toml_path = args.config or os.getenv('RUST_BOOTSTRAP_CONFIG')

0 commit comments

Comments
 (0)