Skip to content

Commit c51b556

Browse files
committed
Add PowerShell snippets for postinstall
1 parent 915d307 commit c51b556

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

install-poetry.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,21 @@ def _get_win_folder_with_ctypes(csidl_name):
262262
You can execute `set -U fish_user_paths {poetry_home_bin} $fish_user_paths`
263263
"""
264264

265-
POST_MESSAGE_CONFIGURE_WINDOWS = """"""
265+
POST_MESSAGE_CONFIGURE_WINDOWS = """
266+
You can choose and execute one of the following commands in PowerShell:
267+
268+
A. Appends the bin directory to your user environment variable `PATH`:
269+
270+
```
271+
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";{poetry_home_bin}", "User")
272+
```
273+
274+
B. Tries to appends the bin directory to PATH every when you run PowerShell (>=6 recommended):
275+
276+
```
277+
echo 'if (-not (Get-Command poetry -ErrorAction Ignore)) { $env:Path += ";{poetry_home_bin}" }' | Out-File -Append $PROFILE
278+
```
279+
"""
266280

267281

268282
class PoetryInstallationError(RuntimeError):

0 commit comments

Comments
 (0)