-
Notifications
You must be signed in to change notification settings - Fork 293
fixed #252 #253
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 #252 #253
Conversation
Not an expert on Windows, but I'd say this looks good, it should always need to be escaped I believe. In similar news @dschep any ideas on bootstrapping a CI script / env on Windows? I did manage to setup a docker toolbox on my windows box here, so I can do tests before releases, we just need to script the existing tests in a windows-friendly way. I can't seem to find a web based CI or cloud provider that has windows with docker, maybe there is one though. Seems like a gap in the CI market, but I'd like to make our Windows guys stop feeling abused from breaking builds. :P |
re CI - yes. I have a WIP of porting the tests from bats to tape which should make the tests runnable on windows. Docker support will be trickier, but even just non-docker tests will be WAAYYY more covg than we have now 😄 |
I think this would hide the actual error. Instead of @PatrickBuTaxdoo do you know why the path ends up with double slashes in the first place? Is the On a separate note, |
@kichik I think the single_quote function is messing up. I modified the function like this: function dockerPathForWin(options, path) {
console.log(path);
console.log(quote_single(path));
console.log(path.replace(/\\/g, '/'));
if (process.platform === 'win32') {
return path.replace(/\\/g, '/');
}
return quote_single(path);
} And got this additional output:
So the path before passing it to But if figured that it works without modifying the path for my configuration, so this fix should be more appropriate as it is less likely to break compatibility with docker builds: function dockerPathForWin(options, path) {
if (process.platform === 'win32' && options.dockerizePip) {
return path.replace(/\\/g, '/');
} else if (process.platform === 'win32' && !options.dockerizePip) {
return path
}
return quote_single(path);
} I added a commit to this PR. |
So the other thing |
So, my initial searching doesn't seem to indicate thare are any shell escape libraries for windows, @kichik. 😦 |
So, I'm gonna merge this for the time being. Better than nothing. |
- this was probably missed during merge of serverless#253
- this was probably missed during merge of serverless#253
See #252
Fixed a bug when loading requirements.txt on windows machines with dockerizePip set to false