summaryrefslogtreecommitdiff
path: root/gst-env.py
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-03-25 08:43:10 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2020-03-25 08:43:10 -0400
commitf69a2c9fd2d446754fbe3820d790864c7001c406 (patch)
tree9173f1548cb6329d194521f8ddcab3caad30754e /gst-env.py
parent6d79e7cc97f841bd6e833d217fca394bc74d34d9 (diff)
downloadgstreamer-f69a2c9fd2d446754fbe3820d790864c7001c406.tar.gz
gst-env: Allow setting environment without git
This is needed to use gst-uninstalled mode over NFS when gst-build is a worktree. When this is the case, the .git is a file that links to the original git tree, but this tree is unlikely to be visible over NFS. Instead of forcing NFS contorsion, simply ignore the error.
Diffstat (limited to 'gst-env.py')
-rwxr-xr-xgst-env.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst-env.py b/gst-env.py
index 37503c6e31..1f30a55f4c 100755
--- a/gst-env.py
+++ b/gst-env.py
@@ -430,8 +430,11 @@ if __name__ == "__main__":
exit(1)
# The following incantation will retrieve the current branch name.
- gst_version = git("rev-parse", "--symbolic-full-name", "--abbrev-ref", "HEAD",
- repository_path=options.srcdir).strip('\n')
+ try:
+ gst_version = git("rev-parse", "--symbolic-full-name", "--abbrev-ref", "HEAD",
+ repository_path=options.srcdir).strip('\n')
+ except subprocess.CalledProcessError:
+ gst_version = "unknown"
if options.wine:
gst_version += '-' + os.path.basename(options.wine)