-
Notifications
You must be signed in to change notification settings - Fork 13
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
rakubrew init
on Windows tells me to run rakubrew init
for PowerShell instructions
#81
Comments
The logic to detect whether it's PS or CMD is here. It relies on some env var trickery. (See those 6 lines of code and the linked StackOverflow explanation.) Can you check how the environment looks on your machine? Maybe you can identify some other clue that gives away whether we're in a PS or CMD? |
I don't see anything else in my environment variables that could be used to signal the shell being used either. I'm kind of thinking there is not a good way to tell which shell a user is using. Giving instructions for both powershell and cmd could be a less than ideal solution. |
Looking at your output, I think the Given that usage slowly shifts from CMD to PS, we could err on the side of PS and simply check, whether $env:PSMODULEPATH contains Can you validate whether that would work on your setup (i.e. what does that variable look in a CMD)? |
To me that seems like an artifact of Parallels and however it was configured to share disk access. In other words I suspect it would be possible for that path to not exist in my environment regardless of powershell, although it is true that the path does not show up in PSModulePath on cmd. Then again maybe it would always exist in some form, just not as a path to the documents folder on my mac.
|
I hope I have it sufficiently fixed in v42. I implemented both, shell detection now leans more on the PowerShell side and the init text now shows which shell was detected and how to get info for other shells should the detection have been wrong. |
The instructions from rakubrew init tells me to run rakubrew init for powershell instructions. Yet I'm already running that command from powershell.
The text was updated successfully, but these errors were encountered: