JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.41k stars 2.38k forks source link

Should the docs mention ExecutionPolicy for Windows? #855

Closed justin-hackin closed 3 years ago

justin-hackin commented 3 years ago

Prerequisites

Description

When I followed the instructions for installing on windows, I encountered an issue: $PROFILE was not executable due to the windows ExecutionPolicy. I tried to set the ExecutionPolicy in the admin powershell but it claimed I didn't have the permission to do so. I then tried to set the execution policy for the current user to Unrestricted and that seemed to fix the issue. I'm unfamiliar with Windows shell and all this was new to me. Now I'm concerned that I've made my machine insecure so I can have a beautiful shell. Is there a more secure way to fix this? Do you think it's worth mentioning steps for this in the documentation? Or did I miss something?

Environment

Optional

Steps to Reproduce

N/A

JanDeDobbeleer commented 3 years ago

@justin-hackin you might want to change that to RemoteSigned. The thing is, this goes way beyond the scope of this project.

floh96 commented 3 years ago

@justin-hackin the execution policy is not a security feature because you can bypass it easily. More information is in the powershell docs

AmineDjeghri commented 3 years ago

I just set it to RemoteSigned and it worked, is it dangerous to set it to this please?

justin-hackin commented 3 years ago

@justin-hackin you might want to change that to RemoteSigned. The thing is, this goes way beyond the scope of this project.

Okay fair enough. However, by default the profile didn't exist so a link to instructions on how to create one might be useful as I gather you're supposed to use New-Item, correct? Or is it okay to just create that file with my editor?

JanDeDobbeleer commented 3 years ago

@justin-hackin yes, creating one with the editor is perfectly fine. The thing is, that's basic Powershell knowledge. I don't mean this in a bad way, only that adding all of these details to the docs, for every language and in extension every platform/terminal, is impossible. Those are things we sort of expect people to know. And obviously we have this medium to answer any questions in case that turns out to be untrue and help people out. We've all needed to learn that at one point in time.

JanDeDobbeleer commented 3 years ago

@AmineDjeghri you're all set!

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.