Skip to content

Commit ecf6865

Browse files
committed
docs(Python): 添加Windows平台uv配置设置和测试命令
1 parent 8d76830 commit ecf6865

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/recipe/lang/Python/rawstr4c.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,25 @@ grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p'
4545
@sed@ '/^\[\[index\]\]$/,/^default = true$/{s|^url = ".*"$|url = "@url@"|;}' @f@
4646
```
4747

48+
### Set uv config on Windows
49+
50+
```powershell
51+
powershell -Command "$content = Get-Content '@f@'; $content = $content -replace '^url = \".*\"$', 'url = \"@url@\"'; $content | Set-Content '@f@'"
52+
```
53+
4854

4955
### Test uv if set source
5056

5157
```sh
5258
grep -q '^\[\[index]]$' @f@
5359
```
5460

61+
### Test uv if set source on Windows
62+
63+
```powershell
64+
powershell -Command "if (Get-Content @f@ | Select-String '^\[\[index\]\]$') { exit 0 } else { exit 1 }"
65+
```
66+
5567
<br>
5668

5769

@@ -64,4 +76,4 @@ grep -q '^\[\[index]]$' @f@
6476
[[sources]]
6577
name = "@1@"
6678
url = "@2@"
67-
```
79+
```

0 commit comments

Comments
 (0)