SCons: Attempt to deal with branches without upstream configured
This commit is contained in:
@@ -441,7 +441,7 @@ def buildinfo(lenv, build_type):
|
|||||||
no_upstream = False
|
no_upstream = False
|
||||||
|
|
||||||
try :
|
try :
|
||||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
|
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}'], stderr=subprocess.STDOUT).strip()
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
# assume branch has no upstream configured
|
# assume branch has no upstream configured
|
||||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
||||||
|
Reference in New Issue
Block a user