Skip to content
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

corber open ios is unable to open projects with a space in the name #497

Closed
ddoria921 opened this issue May 11, 2018 · 2 comments
Closed

Comments

@ddoria921
Copy link
Contributor

Environment

Mac OS 10.13.4

Reproduction

Create a project where the name in the config.xml file includes a space like "My App".
Then run corber open ios

Possible Solution

Looking at the source code I see that the open-app.js cordova task opens the repo by simply taking the name from the config.xml file and opening the xcode project by that name in the ios directory.

A possible fix to this would be replacing the spaces in the name with \ (a space character following the backslash). This is the way you open files with spaces in the name on a Mac. Not sure if the solution would be the same for Windows.

@ddoria921
Copy link
Contributor Author

Diving into the code there can be a check here to add the necessary backslash https://github.com/isleofcode/corber/blob/master/lib/utils/open-app-command.js#L11

But I noticed there was a comment above pointing to the original file here https://github.com/pwnall/node-open/blob/0c3ad272bfbc163cce8806e64630c623a9cfd8f4/lib/open.js

Looks like the original file had an escape() function that handled the backslash scenario. Any reason why is was removed? If it was a mistake I don't mind opening a PR to add it back.

@alexblom
Copy link
Member

Thanks for the report - not intentional on our side and would welcome your solution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants