Skip to content

Commit 63b858c

Browse files
authored
style: Use correct casing for $PSScriptRoot (#4775)
1 parent 59328fc commit 63b858c

34 files changed

Lines changed: 137 additions & 138 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
### Styles
6868

6969
- **test:** Format scripts by VSCode's PowerShell extension ([#4609](https://github.com/ScoopInstaller/Scoop/issues/4609))
70+
- **style:** Use correct casing for `$PSScriptRoot` ([#4775](https://github.com/ScoopInstaller/Scoop/issues/4775))
7071

7172
### Tests
7273

bin/checkver.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ param(
6565
[String] $Version = ''
6666
)
6767

68-
. "$psscriptroot\..\lib\core.ps1"
69-
. "$psscriptroot\..\lib\manifest.ps1"
70-
. "$psscriptroot\..\lib\buckets.ps1"
71-
. "$psscriptroot\..\lib\autoupdate.ps1"
72-
. "$psscriptroot\..\lib\json.ps1"
73-
. "$psscriptroot\..\lib\versions.ps1"
74-
. "$psscriptroot\..\lib\install.ps1" # needed for hash generation
75-
. "$psscriptroot\..\lib\unix.ps1"
68+
. "$PSScriptRoot\..\lib\core.ps1"
69+
. "$PSScriptRoot\..\lib\manifest.ps1"
70+
. "$PSScriptRoot\..\lib\buckets.ps1"
71+
. "$PSScriptRoot\..\lib\autoupdate.ps1"
72+
. "$PSScriptRoot\..\lib\json.ps1"
73+
. "$PSScriptRoot\..\lib\versions.ps1"
74+
. "$PSScriptRoot\..\lib\install.ps1" # needed for hash generation
75+
. "$PSScriptRoot\..\lib\unix.ps1"
7676

7777
$Dir = Resolve-Path $Dir
7878
$Search = $App

bin/refresh.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# for development, update the installed scripts to match local source
2-
. "$psscriptroot\..\lib\core.ps1"
2+
. "$PSScriptRoot\..\lib\core.ps1"
33

44
$src = relpath ".."
55
$dest = ensure (versiondir 'scoop' 'current')

lib/autoupdate.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
TODO
33
- clean up
44
#>
5-
. "$psscriptroot\..\lib\json.ps1"
6-
7-
. "$psscriptroot/core.ps1"
8-
. "$psscriptroot/json.ps1"
5+
. "$PSScriptRoot\core.ps1"
6+
. "$PSScriptRoot\json.ps1"
97

108
function find_hash_in_rdf([String] $url, [String] $basename) {
119
$data = $null

lib/install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
. "$PSScriptRoot/autoupdate.ps1"
2-
. "$PSScriptRoot/buckets.ps1"
1+
. "$PSScriptRoot\autoupdate.ps1"
2+
. "$PSScriptRoot\buckets.ps1"
33

44
function nightly_version($date, $quiet = $false) {
55
$date_str = $date.tostring("yyyyMMdd")

lib/json.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function ConvertToPrettyJson {
9393
}
9494

9595
function json_path([String] $json, [String] $jsonpath, [Hashtable] $substitutions, [Boolean] $reverse, [Boolean] $single) {
96-
Add-Type -Path "$psscriptroot\..\supporting\validator\bin\Newtonsoft.Json.dll"
96+
Add-Type -Path "$PSScriptRoot\..\supporting\validator\bin\Newtonsoft.Json.dll"
9797
if ($null -ne $substitutions) {
9898
$jsonpath = substitute $jsonpath $substitutions ($jsonpath -like "*=~*")
9999
}

lib/manifest.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
. "$psscriptroot/core.ps1"
2-
. "$psscriptroot/autoupdate.ps1"
1+
. "$PSScriptRoot\core.ps1"
2+
. "$PSScriptRoot\autoupdate.ps1"
33

44
function manifest_path($app, $bucket) {
55
fullpath "$(Find-BucketDirectory $bucket)\$(sanitary_path $app).json"

libexec/scoop-alias.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ param(
2323
[Switch]$verbose = $false
2424
)
2525

26-
. "$psscriptroot\..\lib\core.ps1"
27-
. "$psscriptroot\..\lib\help.ps1"
28-
. "$psscriptroot\..\lib\install.ps1"
26+
. "$PSScriptRoot\..\lib\core.ps1"
27+
. "$PSScriptRoot\..\lib\help.ps1"
28+
. "$PSScriptRoot\..\lib\install.ps1"
2929

3030
$script:config_alias = 'alias'
3131

libexec/scoop-checkup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Help: Performs a series of diagnostic tests to try to identify things that may
44
# cause problems with Scoop.
55

6-
. "$psscriptroot\..\lib\core.ps1"
7-
. "$psscriptroot\..\lib\diagnostic.ps1"
6+
. "$PSScriptRoot\..\lib\core.ps1"
7+
. "$PSScriptRoot\..\lib\diagnostic.ps1"
88

99
$issues = 0
1010
$defenderIssues = 0

libexec/scoop-cleanup.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
# -g, --global Cleanup a globally installed app
1010
# -k, --cache Remove outdated download cache
1111

12-
. "$psscriptroot\..\lib\core.ps1"
13-
. "$psscriptroot\..\lib\manifest.ps1"
14-
. "$psscriptroot\..\lib\buckets.ps1"
15-
. "$psscriptroot\..\lib\versions.ps1"
16-
. "$psscriptroot\..\lib\getopt.ps1"
17-
. "$psscriptroot\..\lib\help.ps1"
18-
. "$psscriptroot\..\lib\install.ps1"
12+
. "$PSScriptRoot\..\lib\core.ps1"
13+
. "$PSScriptRoot\..\lib\manifest.ps1"
14+
. "$PSScriptRoot\..\lib\buckets.ps1"
15+
. "$PSScriptRoot\..\lib\versions.ps1"
16+
. "$PSScriptRoot\..\lib\getopt.ps1"
17+
. "$PSScriptRoot\..\lib\help.ps1"
18+
. "$PSScriptRoot\..\lib\install.ps1"
1919

2020
reset_aliases
2121

0 commit comments

Comments
 (0)