Commit c98b0472 authored by maruel@chromium.org's avatar maruel@chromium.org

Strip newline/whitespace from 'which' output when

looking for non-standard-named depot_tools directory
in git cl hooks python script.  Otherwise, python
ignores the path.

Patch contributed by James Jones @ nvidia.

BUG=chromium-os:7007

Review URL: http://codereview.chromium.org/3467013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@60499 0039d316-1c4b-4281-b951-d872f2087c98
parent 2379632b
......@@ -21,7 +21,7 @@ for path in os.environ.get("PATH").split(os.pathsep):
if not depot_tools_path:
# Grab a `which gclient', which gives first match
# `which' also uses PATH, but is not restricted to specific directory name
path = Popen(["which", "gclient"], stdout=PIPE).communicate()[0]
path = Popen(["which", "gclient"], stdout=PIPE).communicate()[0].strip()
if path:
depot_tools_path = path.replace("/gclient","")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment