windows: expand environment vars in find_exe
authorSteve Borho <steve@borho.org>
Tue, 29 Dec 2009 23:59:41 -0600
changeset 10156 c31ac3f7fd8f
parent 10153 000546ec7ced
child 10157 5d92fe90be84
windows: expand environment vars in find_exe This allows us to use ${ProgramFiles} in our [merge-tools] sections so we can provide locale safe program paths.
mercurial/windows.py
--- a/mercurial/windows.py	Mon Dec 28 16:48:57 2009 +0100
+++ b/mercurial/windows.py	Tue Dec 29 23:59:41 2009 -0600
@@ -203,7 +203,7 @@
         executable = findexisting(os.path.join(path, command))
         if executable is not None:
             return executable
-    return None
+    return findexisting(os.path.expanduser(os.path.expandvars(command)))
 
 def set_signal_handler():
     try: