mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-30 06:39:30 +08:00
docs(Python): 添加Windows平台uv配置设置和测试命令
This commit is contained in:
@@ -45,6 +45,12 @@ grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p'
|
||||
@sed@ '/^\[\[index\]\]$/,/^default = true$/{s|^url = ".*"$|url = "@url@"|;}' @f@
|
||||
```
|
||||
|
||||
### Set uv config on Windows
|
||||
|
||||
```powershell
|
||||
powershell -Command "$content = Get-Content '@f@'; $content = $content -replace '^url = \".*\"$', 'url = \"@url@\"'; $content | Set-Content '@f@'"
|
||||
```
|
||||
|
||||
|
||||
### Test uv if set source
|
||||
|
||||
@@ -52,6 +58,12 @@ grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p'
|
||||
grep -q '^\[\[index]]$' @f@
|
||||
```
|
||||
|
||||
### Test uv if set source on Windows
|
||||
|
||||
```powershell
|
||||
powershell -Command "if (Get-Content @f@ | Select-String '^\[\[index\]\]$') { exit 0 } else { exit 1 }"
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
@@ -64,4 +76,4 @@ grep -q '^\[\[index]]$' @f@
|
||||
[[sources]]
|
||||
name = "@1@"
|
||||
url = "@2@"
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user