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

docs: recommend quoting for portability #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsherret
Copy link

@dsherret dsherret commented Apr 24, 2024

The current recommendation relies on the user's shell's glob handling behaviour. It happens to work because generally something:* does not match any files, and so with sh's default behaviour it passes something:* as-is as an arg. This breaks down in some other shells though, for example, with zsh:

...or with yarn, as referenced in the issues that will be closed by this PR.

This change recommends quoting the globs with single quotes, which will avoid the glob expansion (which requires traversing the file system) and will also be more portable to work in more cases.

Closes #200
Closes #196

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

Successfully merging this pull request may close these issues.

Glob matching does not work when specified in script using Yarn 2 Stopped working with yarn
1 participant