Chromium Code Reviews| Index: git_cl/git_cl.py |
| =================================================================== |
| --- git_cl/git_cl.py (revision 77944) |
| +++ git_cl/git_cl.py (working copy) |
| @@ -710,9 +710,16 @@ |
| fileobj.write(starting_text) |
| fileobj.close() |
| - result = None |
| + # Open up the default editor in the system to get the CL description. |
| + # Msysgit requires the usage of 'env' to be present. The only way to |
| + # accomplish that is by reading the environment variable for mingw\bin. |
| + cmd = [editor, filename] |
| + if sys.platform == 'win32': |
|
M-A Ruel
2011/03/12 18:27:28
same
Mohamed Mansour
2011/03/12 18:36:57
Done.
|
| + msysgit_found = os.environ['PATH'].find('mingw\\bin') != -1 |
| + if msysgit_found: |
| + cmd.insert(0, 'env') |
| try: |
| - subprocess.check_call(['env', editor, filename], shell=True) |
| + subprocess.check_call(cmd) |
| fileobj = open(filename) |
| result = fileobj.read() |
| fileobj.close() |