{"action":"created","issue":{"url":"https://api.github.com/repos/git-cola/git-cola/issues/492","labels_url":"https://api.github.com/repos/git-cola/git-cola/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/git-cola/git-cola/issues/492/comments","events_url":"https://api.github.com/repos/git-cola/git-cola/issues/492/events","html_url":"https://github.com/git-cola/git-cola/issues/492","id":102911498,"number":492,"title":"Error when choosing Launch Diff Tool on Windows","user":{"login":"albertdev","id":1451362,"avatar_url":"https://avatars.githubusercontent.com/u/1451362?v=3","gravatar_id":"","url":"https://api.github.com/users/albertdev","html_url":"https://github.com/albertdev","followers_url":"https://api.github.com/users/albertdev/followers","following_url":"https://api.github.com/users/albertdev/following{/other_user}","gists_url":"https://api.github.com/users/albertdev/gists{/gist_id}","starred_url":"https://api.github.com/users/albertdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertdev/subscriptions","organizations_url":"https://api.github.com/users/albertdev/orgs","repos_url":"https://api.github.com/users/albertdev/repos","events_url":"https://api.github.com/users/albertdev/events{/privacy}","received_events_url":"https://api.github.com/users/albertdev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-24T23:17:53Z","updated_at":"2015-08-27T01:27:00Z","closed_at":null,"body":"I have a file with status modified and right-click it to press Launch Diff Tool in the context menu. I'm then greeted by this error:\r\n![failed to launch diff](https://cloud.githubusercontent.com/assets/1451362/9454325/626fb7b0-4ac1-11e5-9556-c2525304fb0c.PNG)\r\n\r\nTested with git-cola v2.3.\r\n\r\n---\r\n\r\nI've been debugging this issue so here's my results.\r\n\r\nThis is what the `args` variable looks like *before* `core._win32_find_exe` is executed on [line 189](https://github.com/git-cola/git-cola/blob/master/cola/core.py#L189):\r\n\r\n    [u'git', u'difftool', u'--no-prompt', u'--', u'censored.java']\r\n\r\nLooks fairly normal. This is what argv looks like on [line 197](https://github.com/git-cola/git-cola/blob/master/cola/core.py#L197) (note that I'm running a copy of git-cola to insert `print` statements):\r\n\r\n    ['C:\\\\Users\\\\bert\\\\Documents\\\\Temp\\\\git-cola-dev\\\\share\\\\git-cola\\\\lib\\\\cola\\\\git.PY', 'difftool', '--no-prompt', '--', 'censored.java']\r\n\r\nI've checked `_win32_find_exe` and it seems this issue only occurs if you have `.PY` in the `PATHEXT` environment variable. Because git-cola is near the start of the PATH, `git.PY` is found and taken for the git binary.\r\n\r\nSeeing how git-cola starts git just fine in other places, wouldn't it be possible to call git with an absolute path to the git binary for this case as well?"},"comment":{"url":"https://api.github.com/repos/git-cola/git-cola/issues/comments/135235173","html_url":"https://github.com/git-cola/git-cola/issues/492#issuecomment-135235173","issue_url":"https://api.github.com/repos/git-cola/git-cola/issues/492","id":135235173,"user":{"login":"albertdev","id":1451362,"avatar_url":"https://avatars.githubusercontent.com/u/1451362?v=3","gravatar_id":"","url":"https://api.github.com/users/albertdev","html_url":"https://github.com/albertdev","followers_url":"https://api.github.com/users/albertdev/followers","following_url":"https://api.github.com/users/albertdev/following{/other_user}","gists_url":"https://api.github.com/users/albertdev/gists{/gist_id}","starred_url":"https://api.github.com/users/albertdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertdev/subscriptions","organizations_url":"https://api.github.com/users/albertdev/orgs","repos_url":"https://api.github.com/users/albertdev/repos","events_url":"https://api.github.com/users/albertdev/events{/privacy}","received_events_url":"https://api.github.com/users/albertdev/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T01:26:59Z","updated_at":"2015-08-27T01:26:59Z","body":"It works when I remove `.PY` from `PATHEXT`.\r\n\r\nI'd prefer not to do this as it means I cannot use shortened Python scripts on the command line, but I guess it's a workaround..."}}