[devtools] github-merge get toplevel dir without extra whitespace

Fixes a bug in github merge when it runs the tests where the toplevel directory has an extra '\n' appended to the path string. Now it doesn't.
This commit is contained in:
Andrew C committed 2016-01-25 09:02:05 -05:00
1 parent f281caac48
commit 5ed2f16480
1 file changed
+1 -1
+1 -1
View File
@@ -153,7 +153,7 @@ def main():
# Run test command if configured. # Run test command if configured.
if testcmd: if testcmd:
# Go up to the repository's root. # Go up to the repository's root.
toplevel = subprocess.check_output([GIT,'rev-parse','--show-toplevel']) toplevel = subprocess.check_output([GIT,'rev-parse','--show-toplevel']).strip()
os.chdir(toplevel) os.chdir(toplevel)
if subprocess.call(testcmd,shell=True): if subprocess.call(testcmd,shell=True):
print("ERROR: Running %s failed." % testcmd,file=stderr) print("ERROR: Running %s failed." % testcmd,file=stderr)