aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorUK992 <urbankrajnc92@gmail.com>2016-08-05 22:47:27 +0200
committerUK992 <urbankrajnc92@gmail.com>2016-08-05 22:47:27 +0200
commit6548325bd294b55141b1663c5ee91a6a28702962 (patch)
treeae2e97cc36619f502ab4bead9c3396e39b2a62c1 /python/servo/command_base.py
parentfc4fc773b4c62fb1b63f7f9aabea9fa44283e6ad (diff)
downloadservo-6548325bd294b55141b1663c5ee91a6a28702962.tar.gz
servo-6548325bd294b55141b1663c5ee91a6a28702962.zip
Run git command only with mach build commands
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index a6b6e1abcd2..99dc78235ed 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -348,7 +348,7 @@ class CommandBase(object):
" --release" if release else ""))
sys.exit()
- def build_env(self, hosts_file_path=None, target=None):
+ def build_env(self, hosts_file_path=None, target=None, is_build=False):
"""Return an extended environment dictionary."""
env = os.environ.copy()
if sys.platform == "win32" and type(env['PATH']) == unicode:
@@ -445,7 +445,7 @@ class CommandBase(object):
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -W unused-extern-crates"
git_info = []
- if os.path.isdir('.git'):
+ if os.path.isdir('.git') and is_build:
git_sha = subprocess.check_output([
'git', 'rev-parse', '--short', 'HEAD'
]).strip()