From af639a2b7b8220fc5700bca60cff588da30a22f6 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 27 Dec 2021 11:22:57 +0100 Subject: [PATCH] fix(pwsh): print error when install fails in module relates to #1498 --- packages/powershell/oh-my-posh.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/powershell/oh-my-posh.psm1 b/packages/powershell/oh-my-posh.psm1 index f99636cf..0d161f7e 100644 --- a/packages/powershell/oh-my-posh.psm1 +++ b/packages/powershell/oh-my-posh.psm1 @@ -124,8 +124,12 @@ In case you installed using AllUsers and are a non-admin user, please run the following command as an administrator: Import-Module oh-my-posh + +Original Error: + '@ - Write-Error $message + Write-Host $message + Write-Host $_ exit 1 }