You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uv will also discover user-level configuration at ~/.config/uv/uv.toml (or $XDG_CONFIG_HOME/uv/uv.toml) on macOS and Linux, or %APPDATA%\uv\uv.toml on Windows; and system-level configuration at /etc/uv/uv.toml (or $XDG_CONFIG_DIRS/uv/uv.toml) on macOS and Linux, or %SYSTEMDRIVE%\ProgramData\uv\uv.toml on Windows.
Windows 的路径应该为 %APPDATA%\uv\uv.toml,如:C:\Users\Xiaoran\AppData\Roaming\uv\uv.toml。
存放到 ~/.config/uv/uv.toml 则不会读取,换源失败。
chsrc 版本
chsrc: Change Source (GPLv3+) v0.2.1-2025/04/13 by RubyMetric
Activity
happy-game commentedon Jun 1, 2025
事实上不只是存在这一问题, 因为有些命令无法使用(
printf,grep,sed), 在 windows 上为uv换源的命令也无法很好地运行.这个问题应该要花费较长的时间去解决.
xrgzs commentedon Jun 2, 2025
我的Windows环境中已安装busybox,
printf命令运行正常。此issue的核心问题在于文件路径错误。不过,若能避免依赖第三方组件,直接采用 C 原生方法实现文件读写和内容替换功能会是更优的解决方案。happy-game commentedon Jun 2, 2025
感谢提醒, 已在 #200 中实现, 等合并后可以拉取最新的
dev分支进行测试.happy-game commentedon Jun 2, 2025
但目前仍存在一些问题, 由于
grep,sed命令的行为在 windows 的Cygwin环境下存在差异(busybox中没有测试), 故暂时不支持直接修改已存在的uv.toml, 需等待后续解决.ccmywish commentedon Jul 26, 2025
@xrgzs
再试试最新版
v0.2.2,不再依赖printf,只依赖grep和sed,如果没啥问题,这个 issue 可以关闭了。关于 Windows 上的
grep和sed等其他工具依赖,可以在 discussion #201 接着讨论