Bug 1332722 - mozboot: Use msys path for cargo_bin. r?gps
We need to mangle the path for both parts of the text printed
but rust_path_advice on windows. Otherwise the report of where
the rust binary was found ends up a mixed pathname even when
the suggested shell command is correct.
MozReview-Commit-ID: FDtP5HY8tJ1
--- a/python/mozboot/mozboot/base.py
+++ b/python/mozboot/mozboot/base.py
@@ -551,17 +551,18 @@ class BaseBootstrapper(object):
# Suggest ~/.cargo/env if it exists.
if os.path.exists(os.path.join(cargo_home, 'env')):
cmd = 'source %s/env' % cargo_home
else:
# On Windows rustup doesn't write out ~/.cargo/env
# so fall back to a manual PATH update. Bootstrap
# only runs under msys, so a unix-style shell command
# is appropriate there.
- cmd = 'export PATH=%s:$PATH' % self.win_to_msys_path(cargo_bin)
+ cargo_bin = self.win_to_msys_path(cargo_bin)
+ cmd = 'export PATH=%s:$PATH' % cargo_bin
print(template % {
'cargo_bin': cargo_bin,
'cmd': cmd,
})
def ensure_rust_modern(self):
modern, version = self.is_rust_modern()