-
Notifications
You must be signed in to change notification settings - Fork 8
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
Bootstrap fails when destination path has a space #74
Comments
Method to resolve:
These changes made directly on the source of the installed package on my machine resolved the issue. |
Upon further inspection this may be better suited for |
Thanks for the analysis :) I think that the fact that this value https://github.com/cksource/mgit2/blob/7c2a2ee6e2b7d3e4c569332fab65bf8dd9d97518/lib/commands/bootstrap.js#L24 may have spaces in it is fine. It's path to a directory and e.g. if we wanted to print it out to the console, we wouldn't like (I think) to have it escaped there. E.g. So, it'd be good to keep these values unescaped up to the point where we pass them to bash. The issue is exactly there – in the place where we create bash commands out of the input we get. In fact, there must be a lib for that :D So, a quick fix will be to move |
The fastest and correct fix for that is use I would like to fix that issue during work on #73. |
#73 will take a significant amount of time. Let's not block the quick fix because the tool is now broken for other people. |
Fix: Whitespaces in a CWD should not break the `bootstrap` command. Closes #74.
This refers to a twitter conversation with @Reinmar https://twitter.com/alexeckermann/status/933241249548582912
Running
mgit bootstrap
threw a consecutive series of errors with the descriptionfatal: Too many arguments.
.With the guidance from @Reinmar I printed to STDOUT the command being executed and it was immediately apparent that the
destinationPath
in cksource/mgit2/lib/commands/bootstrap.js was not escaping space characters in the command.Example:
git clone --progress git@github.com:ckeditor/ckeditor5-widget.git /Users/alexeckermann/Documents/Projects/Open Source/ckeditor5/packages/ckeditor5-widget && cd /Users/alexeckermann/Documents/Projects/Open Source/ckeditor5/packages/ckeditor5-widget && git checkout --quiet master
Which should be:
git clone --progress git@github.com:ckeditor/ckeditor5-widget.git /Users/alexeckermann/Documents/Projects/Open\ Source/ckeditor5/packages/ckeditor5-widget && cd /Users/alexeckermann/Documents/Projects/Open\ Source/ckeditor5/packages/ckeditor5-widget && git checkout --quiet master
I will put together a PR and associate with this issue.
The text was updated successfully, but these errors were encountered: