Bug 1332722 - mozboot: Use msys path for cargo_bin. r?gps draft
authorRalph Giles <giles@mozilla.com>
Fri, 20 Jan 2017 11:55:05 -0800
changeset 464261 3256df0068f9ab3c7c5b6e868575a4a26f9f63cd
parent 464260 37320bf3c11dd66a924c4240bab220e3003efac3
child 464521 911dd1f7a8c7bb4a55ec7b80e857e3a3b3ff0582
push id42324
push userbmo:giles@thaumas.net
push dateFri, 20 Jan 2017 20:13:09 +0000
reviewersgps
bugs1332722
milestone53.0a1
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()