Skip to content

Commit fead7be

Browse files
lewis-yeungbrian6932
authored andcommitted
fix(scoop-download|install|update): Use consistent options (ScoopInstaller#5956)
1 parent 4c14dc1 commit fead7be

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- **core:** Fix `Invoke-ExternalCommand` quoting rules ([#5945](https://github.com/ScoopInstaller/Scoop/issues/5945))
1414
- **system:** Fix argument passing to `Split-PathLikeEnvVar()` in deprecated `strip_path()` ([#5937](https://github.com/ScoopInstaller/Scoop/issues/5937))
1515
- **scoop-cache:** Fix regression in 36026f18 ([#5944](https://github.com/ScoopInstaller/Scoop/issues/5944))
16+
- **scoop-download|install|update:** Use consistent options ([#5956](https://github.com/ScoopInstaller/Scoop/issues/5956))
1617
- **core:** Fix "Invoke-ExternalCommand" quoting rules ([#5945](https://github.com/ScoopInstaller/Scoop/issues/5945))
1718
- **scoop-info:** Fix download size estimating ([#5958](https://github.com/ScoopInstaller/Scoop/issues/5958))
1819

libexec/scoop-download.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
# Options:
1717
# -f, --force Force download (overwrite cache)
18-
# -h, --no-hash-check Skip hash verification (use with caution!)
18+
# -s, --skip-hash-check Skip hash verification (use with caution!)
1919
# -u, --no-update-scoop Don't update Scoop before downloading if it's outdated
2020
# -a, --arch <32bit|64bit|arm64> Use the specified architecture, if the app supports it
2121

@@ -28,10 +28,10 @@ if (get_config USE_SQLITE_CACHE) {
2828
. "$PSScriptRoot\..\lib\database.ps1"
2929
}
3030

31-
$opt, $apps, $err = getopt $args 'fhua:' 'force', 'no-hash-check', 'no-update-scoop', 'arch='
31+
$opt, $apps, $err = getopt $args 'fsua:' 'force', 'skip-hash-check', 'no-update-scoop', 'arch='
3232
if ($err) { error "scoop download: $err"; exit 1 }
3333

34-
$check_hash = !($opt.h -or $opt.'no-hash-check')
34+
$check_hash = !($opt.s -or $opt.'skip-hash-check')
3535
$use_cache = !($opt.f -or $opt.force)
3636
$architecture = Get-DefaultArchitecture
3737
try {

libexec/scoop-install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# -g, --global Install the app globally
1818
# -i, --independent Don't install dependencies automatically
1919
# -k, --no-cache Don't use the download cache
20+
# -s, --skip-hash-check Skip hash validation (use with caution!)
2021
# -u, --no-update-scoop Don't update Scoop before installing if it's outdated
21-
# -s, --skip Skip hash validation (use with caution!)
2222
# -a, --arch <32bit|64bit|arm64> Use the specified architecture, if the app supports it
2323

2424
. "$PSScriptRoot\..\lib\getopt.ps1"
@@ -36,11 +36,11 @@ if (get_config USE_SQLITE_CACHE) {
3636
. "$PSScriptRoot\..\lib\database.ps1"
3737
}
3838

39-
$opt, $apps, $err = getopt $args 'gikusa:' 'global', 'independent', 'no-cache', 'no-update-scoop', 'skip', 'arch='
39+
$opt, $apps, $err = getopt $args 'giksua:' 'global', 'independent', 'no-cache', 'skip-hash-check', 'no-update-scoop', 'arch='
4040
if ($err) { "scoop install: $err"; exit 1 }
4141

4242
$global = $opt.g -or $opt.global
43-
$check_hash = !($opt.s -or $opt.skip)
43+
$check_hash = !($opt.s -or $opt.'skip-hash-check')
4444
$independent = $opt.i -or $opt.independent
4545
$use_cache = !($opt.k -or $opt.'no-cache')
4646
$architecture = Get-DefaultArchitecture

libexec/scoop-update.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# You can use '*' in place of <app> to update all apps.
77
#
88
# Options:
9-
# -f, --force Force update even when there isn't a newer version
10-
# -g, --global Update a globally installed app
11-
# -i, --independent Don't install dependencies automatically
12-
# -k, --no-cache Don't use the download cache
13-
# -s, --skip Skip hash validation (use with caution!)
14-
# -q, --quiet Hide extraneous messages
15-
# -a, --all Update all apps (alternative to '*')
9+
# -f, --force Force update even when there isn't a newer version
10+
# -g, --global Update a globally installed app
11+
# -i, --independent Don't install dependencies automatically
12+
# -k, --no-cache Don't use the download cache
13+
# -s, --skip-hash-check Skip hash validation (use with caution!)
14+
# -q, --quiet Hide extraneous messages
15+
# -a, --all Update all apps (alternative to '*')
1616

1717
. "$PSScriptRoot\..\lib\getopt.ps1"
1818
. "$PSScriptRoot\..\lib\json.ps1" # 'save_install_info' in 'manifest.ps1' (indirectly)
@@ -28,11 +28,11 @@ if (get_config USE_SQLITE_CACHE) {
2828
. "$PSScriptRoot\..\lib\database.ps1"
2929
}
3030

31-
$opt, $apps, $err = getopt $args 'gfiksqa' 'global', 'force', 'independent', 'no-cache', 'skip', 'quiet', 'all'
31+
$opt, $apps, $err = getopt $args 'gfiksqa' 'global', 'force', 'independent', 'no-cache', 'skip-hash-check', 'quiet', 'all'
3232
if ($err) { "scoop update: $err"; exit 1 }
3333
$global = $opt.g -or $opt.global
3434
$force = $opt.f -or $opt.force
35-
$check_hash = !($opt.s -or $opt.skip)
35+
$check_hash = !($opt.s -or $opt.'skip-hash-check')
3636
$use_cache = !($opt.k -or $opt.'no-cache')
3737
$quiet = $opt.q -or $opt.quiet
3838
$independent = $opt.i -or $opt.independent

0 commit comments

Comments
 (0)