Update index.js to support windows (untested!) - #2
Conversation
i discovered this on a new windows tablet by accident. I tested with Git Bash for Windows. This might break Linux or other Windows shells so be cautious and give it some extra testing. Changes: - instead of spawning the shellwrapper (.sh file) directly i do now spawn the "bash" aka opts.shell (so you can specify own shell). - using path.join for concatenating file paths
|
Generally looks good although it's really two unrelated patches - one for fixing the path, and the other for picking the shell to use. As you can see the test failed, the second bit about the shell may need a little more work. |
|
actually both are part of the fix for Windows.
|
|
I get that but the changes themselves are not related to each other, and only one of them breaks the build. |
|
So, they should at least be different commits, but if they were sep PRs at least one could get merged right away. |
|
i removed path changes from patch. i suppose that one was anyways cosmetics and node probably translates "/" to "" on lower level functions like spawn. the reason for broken test was supposedly the test itself as it does some counting and comparison on number of keys on env object. |
|
The existing functionality on unix allows the process owner's shell to be used by default, which may or may not be |
|
Also, the path fix is probably good to have, I wouldn't mind having that as a sep pr. |
|
another thing - generally it's good to squash your commits on prs so that the history is as legible as possible for others. |
|
of course it multiple commits make sense, you should include then, but not wip or cleanup commits |
|
travis stuff should also be updated - can you bring node js versions up to date and include windows if possible? |
|
Sorry to be such a pain but it looks like ppl are actually using this module so we should probably make sure we don't break it: https://www.npmjs.com/package/shell-source |
|
Just thinking about what the ideal pr might looks like: branch name would be maybe |
|
i agree with your suggestions. though after thinking about it, lets discard that pull request. |
|
Fair enough. I suppose we can also just leave this PR open as an indicator that this is still unresolved? Maybe someone else will come along and fix it - I don't have the time right now to do a good job of it either. |
|
fine for me 👍 |
i discovered this on a new windows tablet by accident. I tested with Git Bash for Windows. This might break Linux or other Windows shells so be cautious and give it some extra testing.
Changes: