diff --git a/install-poetry.py b/install-poetry.py index bf63403..ec24dd5 100644 --- a/install-poetry.py +++ b/install-poetry.py @@ -262,7 +262,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. Appends the bin directory to your user environment variable `PATH`: + +``` +[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";{poetry_home_bin}", "User") +``` + +B. Tries to appends 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):