Skip to content

[Code scan] Quote dependency specifier in ReadTheDocs install command #144

Description

@njzjz

This issue was found by a Codex global scan of the repository at commit 19f9265.

The ReadTheDocs install job passes deepmd-kit[torch]>=3.0.0b2 through a shell command without quoting:

- uv venv $READTHEDOCS_VIRTUALENV_PATH
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install deepmd-kit[torch]>=3.0.0b2 --extra-index-url https://download.pytorch.org/whl/cpu
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)") uv pip install -e .[docs]

In POSIX shells, > is parsed as output redirection. A minimal shell reproduction shows the command is split as deepmd-kit[torch] and redirects the remaining output into a file named =3.0.0b2.

$ printf '%s
' deepmd-kit[torch]>=3.0.0b2 --extra-index-url https://download.pytorch.org/whl/cpu
# creates file '=3.0.0b2' containing the arguments instead of passing the version specifier

This can make RTD install an unconstrained deepmd-kit[torch] requirement or fail in hard-to-read ways.

Suggested fix: quote the requirement, for example "deepmd-kit[torch]>=3.0.0b2", and consider quoting .[docs] for the same reason shells can treat brackets as glob syntax.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions