From 91324659240f17ffca35c705cfeda8d549d670de Mon Sep 17 00:00:00 2001 From: beyondmeat <51850644+beyondmeat@users.noreply.github.com> Date: Sat, 5 Mar 2022 11:37:18 -0700 Subject: [PATCH] bin: Fix formatjson and others erroring (#578) --- Scoop-Bucket.Tests.ps1 | 2 +- bin/auto-pr.ps1 | 4 ++-- bin/checkurls.ps1 | 4 ++-- bin/checkver.ps1 | 4 ++-- bin/formatjson.ps1 | 4 ++-- bin/missing-checkver.ps1 | 4 ++-- bin/test.ps1 | 3 +-- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Scoop-Bucket.Tests.ps1 b/Scoop-Bucket.Tests.ps1 index 5393a09c..5e620e89 100644 --- a/Scoop-Bucket.Tests.ps1 +++ b/Scoop-Bucket.Tests.ps1 @@ -1,2 +1,2 @@ -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) } . "$env:SCOOP_HOME\test\Import-Bucket-Tests.ps1" diff --git a/bin/auto-pr.ps1 b/bin/auto-pr.ps1 index 18d65859..a558b5a6 100644 --- a/bin/auto-pr.ps1 +++ b/bin/auto-pr.ps1 @@ -3,7 +3,7 @@ param( [String]$upstream = "Calinou/scoop-games: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 { "$_ " })" +Invoke-Expression -command "& '$autopr' -dir '$dir' -upstream $upstream $($args | ForEach-Object { "$_ " })" diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1 index dd695e89..8d2ca121 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 { "$_ " })" +Invoke-Expression -command "& '$checkurls' -dir '$dir' $($args | ForEach-Object { "$_ " })" diff --git a/bin/checkver.ps1 b/bin/checkver.ps1 index 688b9dc3..fe8942d2 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 { "$_ " })" +Invoke-Expression -command "& '$checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })" diff --git a/bin/formatjson.ps1 b/bin/formatjson.ps1 index ae0098c2..4fe306de 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 -path $path $($args | ForEach-Object { "$_ " })" +Invoke-Expression -command "& '$formatjson' -dir '$path' $($args | ForEach-Object { "$_ " })" diff --git a/bin/missing-checkver.ps1 b/bin/missing-checkver.ps1 index 77f1bcbe..8c030662 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 { "$_ " })" +Invoke-Expression -command "& '$missing_checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })" diff --git a/bin/test.ps1 b/bin/test.ps1 index 71d4032b..b0ba56ff 100644 --- a/bin/test.ps1 +++ b/bin/test.ps1 @@ -1,4 +1,3 @@ -#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/.."