Bug 1332722 - mozboot: Use msys path for cargo_bin. r=gps
authorRalph Giles <giles@mozilla.com>
Fri, 20 Jan 2017 11:55:05 -0800
changeset 330485 b1c3caea8b7eb19ad5ed4933bee53966b09f41c4
parent 330484 9710f861673f2dc0bd25db1f8fc6d092f06f0e66
child 330486 aec005f46692bf344a18a1895cf1fe72a368814a
push id31239
push userphilringnalda@gmail.com
push dateSat, 21 Jan 2017 23:23:51 +0000
treeherdermozilla-central@160914d65dac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1332722
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
python/mozboot/mozboot/base.py
--- 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()