Skip to content

uv init fails to create .git directory when git outputs is not in English #13612

@guo-yong-zhi

Description

@guo-yong-zhi

Summary

Image

➜ uv init uvtest5 -v

DEBUG uv 0.7.7
DEBUG No Python version file found in ancestors of working directory: /mnt/workspace/gyz/uvtest5
DEBUG Checking for Python environment at uvtest5/.venv
DEBUG Searching for default Python interpreter in managed installations or search path
DEBUG Searching for managed installations at /root/.local/share/uv/python
DEBUG Found managed installation cpython-3.9.22-linux-x86_64-gnu
DEBUG Found cpython-3.9.22-linux-x86_64-gnu at /root/.local/share/uv/python/cpython-3.9.22-linux-x86_64-gnu/bin/python3.9 (managed installations)
DEBUG git rev-parse --is-inside-work-tree failed but didn't contain not a git repository in stderr for /mnt/workspace/gyz/uvtest5
DEBUG No Python version file found in ancestors of working directory: /mnt/workspace/gyz/uvtest5
DEBUG Writing Python versions to /mnt/workspace/gyz/uvtest5/.python-version
Initialized project uvtest5 at /mnt/workspace/gyz/uvtest5

➜ git rev-parse --is-inside-work-tree

fatal: 不是 git 仓库(或者直至挂载点 /mnt 的任何父目录)
停止在文件系统边界(未设置 GIT_DISCOVERY_ACROSS_FILESYSTEM)。

➜ git --version

git version 2.25.1

➜ echo $LANG

zh_CN.UTF-8

Platform

centos

Version

0.7.7

Python version

python3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesMessaging when something goes wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions