Skip to content

Shell-quote pip command when logging #4760

@allanlewis

Description

@allanlewis

Is your feature request related to a problem? Please describe.

In v2021.5.29, pip commands are logged as lists. a82bbb7 amended this to join the lists with spaces. However, this will lead to invalid commands if any token contains a space or some other special character that needs to be escaped for standard shells.

Describe the solution you'd like

Tokens in commands should be shell-quoted for logging.

Describe alternatives you've considered

I'm not aware of any good alternatives to shlex.quote, nor any reason to consider any given the simplicity of the solution.

Additional context

n/a


Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.

I don't feel this is relevant here; the description above should be self-explanatory.

I intend to address this in a PR myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions