docs: quote extras specifiers in install commands - #482
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
6e8acf1 to
8ea345e
Compare
In zsh, `[...]` is a glob character class and NOMATCH is on by default,
so unquoted extras fail outright:
$ uv pip install -e .[torch]
zsh: no matches found: .[torch]
Worse, if a file happens to match the pattern, zsh silently rewrites the
argument instead of erroring -- e.g. with a file named `timesfmt` present,
`pip install timesfm[torch]` becomes `pip install timesfmt`.
Double quotes are the portable form (sh, bash, zsh, fish, cmd, PowerShell)
and match what the project already does in .github/workflows/main.yml and
in timesfm-forecasting/examples/global-temperature/README.md.
8ea345e to
237097a
Compare
CLA is signed and verified. I await your review. |
The install commands in
README.mdand three files undertimesfm-forecasting/fail in zsh, which is the default shell on macOS.zsh treats
[...]as a glob character class and, unlike bash, errors when a pattern matches nothing:Worse, when the pattern does match a file, zsh silently rewrites the argument instead of failing:
Wrapping the specifier in double quotes fixes it, and works in sh, bash, zsh, fish and PowerShell.
The repo already does this in
.github/workflows/main.yml:25.Left
v1/untouched since it's archived.