Skip to content

Abnormal behavior of the uv python dir in Windows systems #3603

@shaonianche

Description

@shaonianche

Describe the bug

When I use the command pdm config python.install_root $(uv python dir) in a Windows terminal, it writes a path containing ANSI color codes.

The uv python dir command produces abnormal output in Windows.

Image

To be compatible with different systems, I think we need to use pdm config python.install_root $(uv python dir --color never).

pdm config python.install_root $(uv python dir)

Image

To reproduce

This command is executed under Windows python.install_root $(uv python dir)

Expected Behavior

python.install_root $(uv python dir --color never).

Environment Information

PDM version: 2.25.5
os_name: Windows11

Verbose Command Output

No response

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions