Rollup merge of #132054 - onur-ozkan:cargo-config, r=Kobzol

do not remove `.cargo` directory

If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](345eb14f6c)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
This commit is contained in:
León Orell Valerian Liehr 2024-10-23 17:24:31 +02:00 committed by GitHub
commit bb65499b61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1092,9 +1092,6 @@ class RustBuild(object):
if not os.path.exists(cargo_dir):
eprint('ERROR: vendoring required, but .cargo/config does not exist.')
raise Exception("{} not found".format(cargo_dir))
else:
if os.path.exists(cargo_dir):
shutil.rmtree(cargo_dir)
def parse_args(args):
"""Parse the command line arguments that the python script needs."""