New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_command appears to be wrong #233

Closed
vsajip opened this Issue Mar 17, 2011 · 1 comment

Comments

Projects
None yet
3 participants
@vsajip
Contributor

vsajip commented Mar 17, 2011

find_command() in util.py seems wrong, though no error shows up in tests. On Windows it will work because os.pathsep is ';', but on Linux the code

if pathext is None:
    pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD')
pathext = [ext for ext in pathext.lower().split(os.pathsep)]

will result in pathext containing a single entry ['.com;.exe;.bat;.cmd'] which is presumably not what's wanted.

@carljm

This comment has been minimized.

Show comment
Hide comment
@carljm

carljm Mar 17, 2011

Contributor

Yes, I think you're right. It's not actually a problem, because pathext is never needed on Linux, so it just falls back to the unextended command name. But we should fix up that code to be more explicitly correct.

Contributor

carljm commented Mar 17, 2011

Yes, I think you're right. It's not actually a problem, because pathext is never needed on Linux, so it just falls back to the unextended command name. But we should fix up that code to be more explicitly correct.

@pnasrat pnasrat closed this in 52bf4e9 Apr 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment