Skip to content

Commit

Permalink
[PostProcessing] [BUGFIX] Pass shell=True to subprocess calls in setu…
Browse files Browse the repository at this point in the history
…p.py.
  • Loading branch information
dsavoiu committed Aug 22, 2019
1 parent bc0d1ff commit 646f5a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PostProcessing/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_version():
'''try to determine version via git'''
try:
# is git available?
subprocess.call(['git', 'status'], stdout=subprocess.PIPE)
subprocess.call('git status', shell=True, stdout=subprocess.PIPE)
except IOError:
# 'git' not available
version = "dev"
Expand All @@ -61,10 +61,10 @@ def get_version():
# is 'git describe' working
try:
# git describe working -> use output
version = subprocess.check_output(['git', 'describe']).strip().decode()
version = subprocess.check_output('git describe', shell=True).strip().decode()
except subprocess.CalledProcessError:
# git describe not working -> use commit hash
version = 'git-' + subprocess.check_output(['git', 'log', '-1', '--format=%h']).strip().decode()
version = 'git-' + subprocess.check_output('git log -1 --format=%h', shell=True).strip().decode()

return version

Expand Down

0 comments on commit 646f5a9

Please sign in to comment.