Skip to content

Commit

Permalink
Add PowerShell snippets for postinstall (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
tats-u authored Nov 21, 2024
1 parent 290e92f commit 6027c8e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,21 @@ def _get_win_folder_with_ctypes(csidl_name):
You can execute `set -U fish_user_paths {poetry_home_bin} $fish_user_paths`
"""

POST_MESSAGE_CONFIGURE_WINDOWS = """"""
POST_MESSAGE_CONFIGURE_WINDOWS = """
You can choose and execute one of the following commands in PowerShell:
A. Append the bin directory to your user environment variable `PATH`:
```
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";{poetry_home_bin}", "User")
```
B. Try to append the bin directory to PATH every when you run PowerShell (>=6 recommended):
```
echo 'if (-not (Get-Command poetry -ErrorAction Ignore)) {{ $env:Path += ";{poetry_home_bin}" }}' | Out-File -Append $PROFILE
```
"""


class PoetryInstallationError(RuntimeError):
Expand Down

0 comments on commit 6027c8e

Please sign in to comment.