Skip to content

Commit ffeca4c

Browse files
committed
fix ci
1 parent 3de5daa commit ffeca4c

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/poetry.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ jobs:
99
shell: bash
1010
steps:
1111
- uses: actions/checkout@main
12-
- run: |
13-
. ./poetry/admin.ps1
14-
Install-Poetry
12+
- run: ./poetry/admin.ps1 Install-Poetry
1513
- run: |
1614
poetry install --extras poetry
1715
- run: |

davidkhala/poetry/cli.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ def main():
1010
reconfigure_parser.add_argument("version", help="Semantic version", default="3.12.7")
1111
args = parser.parse_args()
1212

13-
match args.command:
14-
case "reconfigure":
15-
reconfigure_python(args.version)
13+
if args.command == 'reconfigure':
14+
reconfigure_python(args.version)
1615

1716

1817
if __name__ == "__main__":

poetry/admin.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
$ErrorActionPreference = "Stop"
12
function Install-Poetry
23
{
34
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
45
pip install certifi
56
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
6-
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/davidkhala/windows-utils/master/powershell.ps1 -UseBasicParsing).Content | Invoke-Expression
7+
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/davidkhala/windows-utils/refs/heads/master/powershell/path.ps1 -UseBasicParsing).Content | Invoke-Expression
78
Add-Path $env:APPDATA\Python\Scripts
89
Add-Path $env:APPDATA\Python\Scripts User # need admin to configure `Machine` as replacement of `User`
910

@@ -26,4 +27,7 @@ function Find-Poetry
2627
function Configure
2728
{
2829
Invoke-Item $env:APPDATA/pypoetry/venv/pyvenv.cfg
30+
}
31+
if ($args.Count -gt 0) {
32+
Invoke-Expression ($args -join " ")
2933
}

0 commit comments

Comments
 (0)