diff --git a/CHANGELOG.md b/CHANGELOG.md index e8c3322789..44ae2f21b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - **autoupdate:** Copy `PSCustomObject`-type properties within `substitute()` to prevent reference changes ([#5934](https://github.com/ScoopInstaller/Scoop/issues/5934), [#5962](https://github.com/ScoopInstaller/Scoop/issues/5962)) - **system:** Fix argument passing to `Split-PathLikeEnvVar()` in deprecated `strip_path()` ([#5937](https://github.com/ScoopInstaller/Scoop/issues/5937)) - **scoop-cache:** Fix regression in 36026f18 ([#5944](https://github.com/ScoopInstaller/Scoop/issues/5944)) +- **scoop-download|install|update:** Use consistent options ([#5956](https://github.com/ScoopInstaller/Scoop/issues/5956)) - **core:** Fix "Invoke-ExternalCommand" quoting rules ([#5945](https://github.com/ScoopInstaller/Scoop/issues/5945)) - **scoop-info:** Fix download size estimating ([#5958](https://github.com/ScoopInstaller/Scoop/issues/5958)) diff --git a/libexec/scoop-download.ps1 b/libexec/scoop-download.ps1 index a4ba10d36e..1901527b09 100644 --- a/libexec/scoop-download.ps1 +++ b/libexec/scoop-download.ps1 @@ -15,7 +15,7 @@ # # Options: # -f, --force Force download (overwrite cache) -# -h, --no-hash-check Skip hash verification (use with caution!) +# -s, --skip-hash-check Skip hash verification (use with caution!) # -u, --no-update-scoop Don't update Scoop before downloading if it's outdated # -a, --arch <32bit|64bit|arm64> Use the specified architecture, if the app supports it @@ -28,10 +28,10 @@ if (get_config USE_SQLITE_CACHE) { . "$PSScriptRoot\..\lib\database.ps1" } -$opt, $apps, $err = getopt $args 'fhua:' 'force', 'no-hash-check', 'no-update-scoop', 'arch=' +$opt, $apps, $err = getopt $args 'fsua:' 'force', 'skip-hash-check', 'no-update-scoop', 'arch=' if ($err) { error "scoop download: $err"; exit 1 } -$check_hash = !($opt.h -or $opt.'no-hash-check') +$check_hash = !($opt.s -or $opt.'skip-hash-check') $use_cache = !($opt.f -or $opt.force) $architecture = Get-DefaultArchitecture try { diff --git a/libexec/scoop-install.ps1 b/libexec/scoop-install.ps1 index 1605efd2ac..8d12a9fee9 100644 --- a/libexec/scoop-install.ps1 +++ b/libexec/scoop-install.ps1 @@ -17,8 +17,8 @@ # -g, --global Install the app globally # -i, --independent Don't install dependencies automatically # -k, --no-cache Don't use the download cache +# -s, --skip-hash-check Skip hash validation (use with caution!) # -u, --no-update-scoop Don't update Scoop before installing if it's outdated -# -s, --skip Skip hash validation (use with caution!) # -a, --arch <32bit|64bit|arm64> Use the specified architecture, if the app supports it . "$PSScriptRoot\..\lib\getopt.ps1" @@ -36,11 +36,11 @@ if (get_config USE_SQLITE_CACHE) { . "$PSScriptRoot\..\lib\database.ps1" } -$opt, $apps, $err = getopt $args 'gikusa:' 'global', 'independent', 'no-cache', 'no-update-scoop', 'skip', 'arch=' +$opt, $apps, $err = getopt $args 'giksua:' 'global', 'independent', 'no-cache', 'skip-hash-check', 'no-update-scoop', 'arch=' if ($err) { "scoop install: $err"; exit 1 } $global = $opt.g -or $opt.global -$check_hash = !($opt.s -or $opt.skip) +$check_hash = !($opt.s -or $opt.'skip-hash-check') $independent = $opt.i -or $opt.independent $use_cache = !($opt.k -or $opt.'no-cache') $architecture = Get-DefaultArchitecture diff --git a/libexec/scoop-update.ps1 b/libexec/scoop-update.ps1 index 79bd706a65..92326c4948 100644 --- a/libexec/scoop-update.ps1 +++ b/libexec/scoop-update.ps1 @@ -6,13 +6,13 @@ # You can use '*' in place of to update all apps. # # Options: -# -f, --force Force update even when there isn't a newer version -# -g, --global Update a globally installed app -# -i, --independent Don't install dependencies automatically -# -k, --no-cache Don't use the download cache -# -s, --skip Skip hash validation (use with caution!) -# -q, --quiet Hide extraneous messages -# -a, --all Update all apps (alternative to '*') +# -f, --force Force update even when there isn't a newer version +# -g, --global Update a globally installed app +# -i, --independent Don't install dependencies automatically +# -k, --no-cache Don't use the download cache +# -s, --skip-hash-check Skip hash validation (use with caution!) +# -q, --quiet Hide extraneous messages +# -a, --all Update all apps (alternative to '*') . "$PSScriptRoot\..\lib\getopt.ps1" . "$PSScriptRoot\..\lib\json.ps1" # 'save_install_info' in 'manifest.ps1' (indirectly) @@ -28,11 +28,11 @@ if (get_config USE_SQLITE_CACHE) { . "$PSScriptRoot\..\lib\database.ps1" } -$opt, $apps, $err = getopt $args 'gfiksqa' 'global', 'force', 'independent', 'no-cache', 'skip', 'quiet', 'all' +$opt, $apps, $err = getopt $args 'gfiksqa' 'global', 'force', 'independent', 'no-cache', 'skip-hash-check', 'quiet', 'all' if ($err) { "scoop update: $err"; exit 1 } $global = $opt.g -or $opt.global $force = $opt.f -or $opt.force -$check_hash = !($opt.s -or $opt.skip) +$check_hash = !($opt.s -or $opt.'skip-hash-check') $use_cache = !($opt.k -or $opt.'no-cache') $quiet = $opt.q -or $opt.quiet $independent = $opt.i -or $opt.independent