-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PowerShell snippets for postinstall #22
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
For reviewers, here is a useful StackOverflow answer on the subject: https://stackoverflow.com/a/2571200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Disclaimer, not a Poetry dev]
First off, thank you for making this PR. I think this is an important step to easing new Windows users into Poetry.
My personal feedback is that we should try to keep this simpler. The installer already prints quite a lot of text and having multiple Powershell commands I think could overwhelm the target audience.
If we look at the Unix variant of this for inspiration, it is very simple:
POST_MESSAGE_CONFIGURE_UNIX = """
Add `export PATH="{poetry_home_bin}:$PATH"` to your shell configuration file.
"""
I would recommend we shorten this message to:
POST_MESSAGE_CONFIGURE_WINDOWS = """
Execute the following in Powershell:
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";{poetry_home_bin}", "User")
"""
I tested Option A in this PR in a clean Windows 10 VM, and it worked as expected. 🚀 |
Unix OSes have no choice other than editing profile files for their shells, so how to activate Poetry can be kept simple. In contrast of this, Windows has the built-in manager of environment variables. |
@neersighted Would you be willing to review this PR? I personally think it would be important before the upcoming 1.2 final release. ❤️ |
07185e6
to
29ac455
Compare
Co-authored-by: Arun Babu Neelicattu <[email protected]>
Co-authored-by: Arun Babu Neelicattu <[email protected]>
0e0a425
to
2243411
Compare
#66
This PR allows Windows users to activate
poery
command without forcing them to google how to do it.