diff --git a/bin/auto-pr.ps1 b/bin/auto-pr.ps1 index 8442b45c28..e01544cdae 100644 --- a/bin/auto-pr.ps1 +++ b/bin/auto-pr.ps1 @@ -3,7 +3,7 @@ param( [String]$upstream = "ScoopInstaller/Main:master" ) -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = resolve-path (split-path (split-path (scoop which scoop))) } +if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } $autopr = "$env:SCOOP_HOME/bin/auto-pr.ps1" $dir = "$psscriptroot/../bucket" # checks the parent dir Invoke-Expression -command "& '$autopr' -dir '$dir' -upstream $upstream $($args | ForEach-Object { "$_ " })" diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1 index 5b76d590ea..8d2ca12126 100644 --- a/bin/checkurls.ps1 +++ b/bin/checkurls.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = resolve-path (split-path (split-path (scoop which scoop))) } +if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } $checkurls = "$env:SCOOP_HOME/bin/checkurls.ps1" $dir = "$psscriptroot/../bucket" # checks the parent dir Invoke-Expression -command "& '$checkurls' -dir '$dir' $($args | ForEach-Object { "$_ " })" diff --git a/bin/checkver.ps1 b/bin/checkver.ps1 index a3ddf32e64..fe8942d28c 100644 --- a/bin/checkver.ps1 +++ b/bin/checkver.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = resolve-path (split-path (split-path (scoop which scoop))) } +if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } $checkver = "$env:SCOOP_HOME/bin/checkver.ps1" $dir = "$psscriptroot/../bucket" # checks the parent dir Invoke-Expression -command "& '$checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })" diff --git a/bin/formatjson.ps1 b/bin/formatjson.ps1 index 84725a954a..4fe306de11 100644 --- a/bin/formatjson.ps1 +++ b/bin/formatjson.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = resolve-path (split-path (split-path (scoop which scoop))) } +if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } $formatjson = "$env:SCOOP_HOME/bin/formatjson.ps1" $path = "$psscriptroot/../bucket" # checks the parent dir Invoke-Expression -command "& '$formatjson' -dir '$path' $($args | ForEach-Object { "$_ " })" diff --git a/bin/missing-checkver.ps1 b/bin/missing-checkver.ps1 index ee7b77ec4d..8c030662ba 100644 --- a/bin/missing-checkver.ps1 +++ b/bin/missing-checkver.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = resolve-path (split-path (split-path (scoop which scoop))) } +if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } $missing_checkver = "$env:SCOOP_HOME/bin/missing-checkver.ps1" $dir = "$psscriptroot/../bucket" # checks the parent dir Invoke-Expression -command "& '$missing_checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })" diff --git a/bin/test.ps1 b/bin/test.ps1 index 71d4032b3a..fc150a557e 100644 --- a/bin/test.ps1 +++ b/bin/test.ps1 @@ -1,4 +1,4 @@ #requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '4.4.0' } -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = resolve-path (split-path (split-path (scoop which scoop))) } +if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } Invoke-Pester "$psscriptroot/.."