File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 9
9
shell : bash
10
10
steps :
11
11
- uses : actions/checkout@main
12
- - run : |
13
- . ./poetry/admin.ps1
14
- Install-Poetry
12
+ - run : ./poetry/admin.ps1 Install-Poetry
15
13
- run : |
16
14
poetry install --extras poetry
17
15
- run : |
Original file line number Diff line number Diff line change @@ -10,9 +10,8 @@ def main():
10
10
reconfigure_parser .add_argument ("version" , help = "Semantic version" , default = "3.12.7" )
11
11
args = parser .parse_args ()
12
12
13
- match args .command :
14
- case "reconfigure" :
15
- reconfigure_python (args .version )
13
+ if args .command == 'reconfigure' :
14
+ reconfigure_python (args .version )
16
15
17
16
18
17
if __name__ == "__main__" :
Original file line number Diff line number Diff line change
1
+ $ErrorActionPreference = " Stop"
1
2
function Install-Poetry
2
3
{
3
4
Set-ExecutionPolicy - ExecutionPolicy RemoteSigned - Force
4
5
pip install certifi
5
6
(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
7
8
Add-Path $env: APPDATA \Python\Scripts
8
9
Add-Path $env: APPDATA \Python\Scripts User # need admin to configure `Machine` as replacement of `User`
9
10
@@ -26,4 +27,7 @@ function Find-Poetry
26
27
function Configure
27
28
{
28
29
Invoke-Item $env: APPDATA / pypoetry/ venv/ pyvenv.cfg
30
+ }
31
+ if ($args.Count -gt 0 ) {
32
+ Invoke-Expression ($args -join " " )
29
33
}
You can’t perform that action at this time.
0 commit comments