Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

support paths with spaces for development scripts #89

Closed
wants to merge 1 commit into from

Conversation

MaxFichtelmann
Copy link

@MaxFichtelmann MaxFichtelmann commented Mar 1, 2020

paths are currently accidentally split by word boundaries which breaks if the path contains a space.

Quoting "$@" is usually the intended behaviour, retaining the input arguments.

See also: https://www.gnu.org/software/bash/manual/html_node/Special-Parameters.html

a bit related to developing on windows #39

@facebook-github-bot
Copy link

Hi @MaxFichtelmann!

Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@sebmck
Copy link
Contributor

sebmck commented Mar 1, 2020

Does quoting it work? I thought it would only pass a single argument when we want it exploded.

@MaxFichtelmann
Copy link
Author

MaxFichtelmann commented Mar 1, 2020

yes it is a special behaviour of "$@"

you can test it like this:

$ foo() { for i in $@; do echo $i; done; }
$ foo "1 2" 3
1
2
3

$ foo() { for i in "$@"; do echo $i; done; }
$ foo "1 2" 3
1 2
3

@sebmck
Copy link
Contributor

sebmck commented Mar 1, 2020

Ah nice. I've converted the scripts to Node in #86 so this shouldn't be necessary anymore.

@sebmck
Copy link
Contributor

sebmck commented Mar 2, 2020

Thank you for the PR! I've merged the script conversion change so this is no longer needed.

@sebmck sebmck closed this Mar 2, 2020
@sebmck sebmck mentioned this pull request Mar 2, 2020
27 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants