diff --git a/docs/docs/installation.mdx b/docs/docs/installation.mdx index f01d8082..b8f3ff81 100644 --- a/docs/docs/installation.mdx +++ b/docs/docs/installation.mdx @@ -65,6 +65,16 @@ A [Powershell][powershell] module is available for easy installation. Install-Module oh-my-posh -Scope CurrentUser -AllowPrerelease ``` +If you wish to install for all users in a linux environment, you will need to install from an elevate session +of powershell. You will also need to import the module one time from the elevated session in order to set the +executable permissions correctly. + +```powershell +sudo pwsh +Install-Module oh-my-posh -Scope AllUsers -AllowPrerelease +Import-Module oh-my-posh +``` + #### Usage ##### Show all themes diff --git a/packages/powershell/oh-my-posh/oh-my-posh.psm1 b/packages/powershell/oh-my-posh/oh-my-posh.psm1 index 5371b8c7..ad90daed 100644 --- a/packages/powershell/oh-my-posh/oh-my-posh.psm1 +++ b/packages/powershell/oh-my-posh/oh-my-posh.psm1 @@ -35,7 +35,7 @@ function Set-ExecutablePermissions { return } - Invoke-Expression -Command "chmod +x $executable" + chmod a+x $executable 2>&1 } function Set-PoshPrompt {