diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-18 08:58:05 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-18 08:58:05 -0800 |
commit | 4dc72e6473ba59d18b56bc16e0b396735196732a (patch) | |
tree | 0d0b0ffb4cbc0777d93f8d62c4404e29f1fcdb67 | |
parent | 3d6badafc2870819ae7c240786ffd5eb38ce1ce7 (diff) |
fix emcc --version in other dirs
-rwxr-xr-x | emcc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -120,10 +120,14 @@ if len(sys.argv) == 1: if sys.argv[1] == '--version': revision = '(unknown revision)' + here = os.getcwd() + os.chdir(shared.path_from_root()) try: - revision = execute(['git', 'show'], stdout=PIPE)[0].split('\n')[0] + revision = execute(['git', 'show'], stdout=PIPE, stderr=PIPE)[0].split('\n')[0] except: pass + finally: + os.chdir(here) print '''emcc (Emscripten GCC-like replacement) %s (%s) Copyright (C) 2013 the Emscripten authors (see AUTHORS.txt) This is free and open source software under the MIT license. |