(chore): Change to '$PSScriptRoot'

This commit is contained in:
Hsiao-nan Cheung 2022-03-15 22:01:35 +08:00
parent 0a8890c908
commit f8e4f94870
No known key found for this signature in database
GPG Key ID: A97377F8EF10E3F2
7 changed files with 7 additions and 7 deletions

View File

@ -5,5 +5,5 @@ param(
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
$dir = "$PSScriptRoot/../bucket" # checks the parent dir
Invoke-Expression -command "& '$autopr' -dir '$dir' -upstream $upstream $($args | ForEach-Object { "$_ " })"

View File

@ -1,4 +1,4 @@
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
$dir = "$PSScriptRoot/../bucket" # checks the parent dir
Invoke-Expression -command "& '$checkurls' -dir '$dir' $($args | ForEach-Object { "$_ " })"

View File

@ -1,4 +1,4 @@
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
$dir = "$PSScriptRoot/../bucket" # checks the parent dir
Invoke-Expression -command "& '$checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })"

View File

@ -1,4 +1,4 @@
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
$path = "$PSScriptRoot/../bucket" # checks the parent dir
Invoke-Expression -command "& '$formatjson' -dir '$path' $($args | ForEach-Object { "$_ " })"

View File

@ -1,4 +1,4 @@
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
$dir = "$PSScriptRoot/../bucket" # checks the parent dir
Invoke-Expression -command "& '$missing_checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })"

View File

@ -15,7 +15,7 @@
"pre_install": [
"@(",
" 'if ($args.length -eq 1 -and ($args -eq \"selfupdate\" -or $args -eq \"self-update\")) { & scoop update composer }'",
" 'else { & php (Join-Path $psscriptroot \"composer.phar\") @args }'",
" 'else { & php (Join-Path $PSScriptRoot \"composer.phar\") @args }'",
") | Add-Content -Path \"$dir\\composer.ps1\"",
"if (!(Test-Path \"$persist_dir\\home\") -and (Test-Path \"$env:Appdata\\Composer\")) {",
" Write-Host -F yellow \"Moving old 'COMPOSER_HOME' to '$persist_dir\\home'\"",

View File

@ -14,7 +14,7 @@
"hash": "sha512:d73f9161a1f03b8ecaac7b196b6051fe847b3c402b9c92b1f6f3acbe5b1cf91f7260c0e499b8947bab75920ecec918b39533ca65fa5a1fd3eb6ce7b8e2c58e7d",
"pre_install": [
"echo 'if($args.length -eq 2 -and ($args[0] -eq \"cli\" -and $args[1] -eq \"update\")) { & scoop update wp-cli }' | out-file \"$dir\\wp.ps1\"",
"echo 'else { & php (join-path $psscriptroot \"wp-cli.phar\") @args }' | out-file \"$dir\\wp.ps1\" -append"
"echo 'else { & php (join-path $PSScriptRoot \"wp-cli.phar\") @args }' | out-file \"$dir\\wp.ps1\" -append"
],
"bin": "wp.ps1",
"checkver": {