diff --git a/bin/windows/install_key_remaps.ps1 b/bin/windows/install_key_remaps.ps1 index fd53087..1197205 100644 --- a/bin/windows/install_key_remaps.ps1 +++ b/bin/windows/install_key_remaps.ps1 @@ -2,14 +2,8 @@ # Be sure to install AutoHotKey first -# check working directory -if (!( - (Test-Path bin) -and (Test-Path dotfiles) - )) { - Write-Warning -Message "wrong current path - please execute at repo root" - exit 1 -} +# change working directory to git root +Set-Location (Join-Path $PSScriptRoot "..") # set Ahk2Exe.exe path # example "C:\Program Files\AutoHotKey\Compiler\Ahk2Exe.exe" diff --git a/bin/windows/scoop_apps/update_scoop_list.ps1 b/bin/windows/scoop_apps/update_scoop_list.ps1 index bdfcb4f..e9f20ad 100644 --- a/bin/windows/scoop_apps/update_scoop_list.ps1 +++ b/bin/windows/scoop_apps/update_scoop_list.ps1 @@ -6,11 +6,8 @@ if(!(Get-Command scoop -ErrorAction SilentlyContinue)) { exit 1 } -# execution location -if(!((Test-Path bin) -and (Test-Path dotfiles))) { - Write-Warning "This script need to be executed in dotfiles root" - exit 2 -} +# change working directory to git root +Set-Location (Join-Path $PSScriptRoot "..") # export to JSON