Get the build env before change dir

Otherwise, build_env may fail to find git information.
This commit is contained in:
Xidorn Quan 2016-07-08 17:14:33 +10:00
parent 6389107e19
commit 064f1adb78

View file

@ -368,9 +368,10 @@ class MachCommands(CommandBase):
opts += ["--release"]
build_start = time()
env = self.build_env()
with cd(path.join("ports", "geckolib")):
ret = call(["cargo", "build"] + opts,
env=self.build_env(), verbose=verbose)
env=env, verbose=verbose)
elapsed = time() - build_start
# Generate Desktop Notification if elapsed-time > some threshold value