From 8c6dcd4590acce2e3453ab7a477b88b627e68db1 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 24 Nov 2024 22:39:20 +0100 Subject: [PATCH] bugfix: set location to dotfiles repo for admin processes --- util/chocolatey.psm1 | 2 +- util/winget.psm1 | 2 +- util/wsl.psm1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/util/chocolatey.psm1 b/util/chocolatey.psm1 index 5d1263a..17c075b 100644 --- a/util/chocolatey.psm1 +++ b/util/chocolatey.psm1 @@ -13,5 +13,5 @@ function ChocolateyInstall # Start admin process, import this script, run 'InstallPackages' function Start-Process powershell.exe -Verb RunAs -Wait ` -ArgumentList "-ExecutionPolicy", "Bypass", ` - "-C", "Import-Module ./util/chocolatey.psm1; InstallPackages" + "-C", "cd $pwd; ipmo ./util/chocolatey.psm1; InstallPackages" } diff --git a/util/winget.psm1 b/util/winget.psm1 index 527627b..67dd42c 100644 --- a/util/winget.psm1 +++ b/util/winget.psm1 @@ -17,7 +17,7 @@ function WingetInstall # Start admin process, import this script, run 'InstallPackages' function Start-Process powershell.exe -Verb RunAs -Wait ` -ArgumentList "-ExecutionPolicy", "Bypass", ` - "-C", "Import-Module ./util/winget.psm1; InstallWinget" + "-C", "cd $pwd; ipmo ./util/winget.psm1; InstallWinget" } winget.exe install -s winget --accept-source-agreements (Get-Content ./util/winget.list) diff --git a/util/wsl.psm1 b/util/wsl.psm1 index 5630a2b..def7177 100644 --- a/util/wsl.psm1 +++ b/util/wsl.psm1 @@ -23,7 +23,7 @@ function WSLInstall # Start admin process, import this script, run 'InstallPackages' function Start-Process powershell.exe -Verb RunAs -Wait ` -ArgumentList "-ExecutionPolicy", "Bypass", ` - "-C", "Import-Module ./util/wsl.psm1; InstallWSL" + "-C", "cd $pwd; ipmo ./util/wsl.psm1; InstallWSL" } wsl.exe --install -d Ubuntu