Skip to content

Commit

Permalink
Bug 1384731 - Allow which to find files in paths that use the ~ chara…
Browse files Browse the repository at this point in the history
…cter to represent the home directory r=gps

MozReview-Commit-ID: FeV1k9Piwuo

--HG--
extra : rebase_source : 96ae191da76733e2d9c9a823d3f025025ff9244a
  • Loading branch information
Kirk Steuber committed Jul 26, 2017
1 parent 32087bd commit 9837f22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion third_party/python/which/which.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def whichgen(command, path=None, verbose=0, exts=None):
dirName = dirName[1:-1]
for ext in ['']+exts:
absName = os.path.abspath(
os.path.normpath(os.path.join(dirName, command+ext)))
os.path.expanduser(
os.path.normpath(os.path.join(dirName, command+ext))))
if os.path.isfile(absName):
if usingGivenPath:
fromWhere = "from given path element %d" % i
Expand Down

0 comments on commit 9837f22

Please sign in to comment.