From 6a02ebf82103436006929ccaa2784038de264e1e Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 26 Aug 2024 14:31:15 +0200 Subject: [PATCH] Updated install-powershell.ps1 --- scripts/install-powershell.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install-powershell.ps1 b/scripts/install-powershell.ps1 index d8838ae8..617a753f 100755 --- a/scripts/install-powershell.ps1 +++ b/scripts/install-powershell.ps1 @@ -64,7 +64,11 @@ if (-not $Destination) { if ($IsWinEnv) { $Destination = "$env:LOCALAPPDATA\Microsoft\powershell" } else { - $Destination = "~/.powershell" + if (Test-Path "/opt/PowerShell" -pathType container) { + $Destination = "/opt/PowerShell" + } else { + $Destination = "~/.powershell" + } } if ($Daily) {