-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixed commandExists() not working for absolute path on windows #24
Conversation
Thanks @Antyos! Any idea why the |
It looks like it failed on the check to find a command that does exist with an absolute path, how strange. I would guess it has something to do with the format of absolute paths on Linux. I'll look into it when I have a chance later this week. Thanks! |
Sounds good, thanks @Antyos! |
All fixed! The test code I initially added tried to get Linux to run a As a side note, I noticed that the test code runs about 20x slower on a Windows machine than a Linux one, even before my changes. I looked into it a bit and I think this is an issue with Node's Also, |
Hey @mathisonian, I just wanted to check in and see if we're still good with the pull request. I'm sure you've been busy the last couple of week, so no worries if this got buried in your inbox. |
Hey thanks for pinging me on this @Antyos. The changes look good. I'm not sure about about the windows exec performance thing; I think that and dependencies are separate issues, we can address in a different PR. GitHub isn't alerting me about any vulns but NPM may be ahead, I will look into that . |
To follow up re: dependencies -- it looks like all the issues are coming from subdependencies of mocha. This code is only used for the test suite, so it shouldn't affect end users of this library, but we should still update. |
Thanks for merging it @mathisonian! You should also be able to close issue #23 now. Also, do you plan to update Mocha or does that need a pull request? |
No problem, thanks @Antyos! A PR for mocha would be appreciated if you have the chance, otherwise I will get to it, but no promises on how quickly (I'm a bit bogged down at the moment). |
This fixes issue #23, where the RegEx check that causes commandExistsWindows async/sync to return early for commands with an absolute path, e.g.
C:\Program Files\...
Also included absolute paths test in
test.js
and replaceddir
withxcopy
becausedir
is not a command that has an associated file.where dir
will never return true on Windows.