diff --git a/README.md b/README.md index 1ee7575aa9..9193ce3f3c 100644 --- a/README.md +++ b/README.md @@ -105,9 +105,12 @@ Scoop can utilize [`aria2`](https://github.com/aria2/aria2) to use multi-connect scoop install aria2 ``` +By default, `scoop` displays a warning when running `scoop install` or `scoop update` while `aria2` is enabled. This warning can be suppressed by running `scoop config aria2-warning-enabled false`. + You can tweak the following `aria2` settings with the `scoop config` command: - aria2-enabled (default: true) +- aria2-warning-enabled (default: true) - [aria2-retry-wait](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-retry-wait) (default: 2) - [aria2-split](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-s) (default: 5) - [aria2-max-connection-per-server](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-x) (default: 5) diff --git a/libexec/scoop-install.ps1 b/libexec/scoop-install.ps1 index 70441506ed..a1a59b76a3 100644 --- a/libexec/scoop-install.ps1 +++ b/libexec/scoop-install.ps1 @@ -119,9 +119,10 @@ $skip | Where-Object { $explicit_apps -contains $_ } | ForEach-Object { } $suggested = @{ }; -if (Test-Aria2Enabled) { +if ((Test-Aria2Enabled) -and (get_config 'aria2-warning-enabled' $true)) { warn "Scoop uses 'aria2c' for multi-connection downloads." warn "Should it cause issues, run 'scoop config aria2-enabled false' to disable it." + warn "To disable this warning, run 'scoop config aria2-warning-enabled false'." } $apps | ForEach-Object { install_app $_ $architecture $global $suggested $use_cache $check_hash } diff --git a/libexec/scoop-update.ps1 b/libexec/scoop-update.ps1 index f5b833e883..94a9b13cbd 100644 --- a/libexec/scoop-update.ps1 +++ b/libexec/scoop-update.ps1 @@ -319,9 +319,10 @@ if (!$apps) { } } - if ($outdated -and (Test-Aria2Enabled)) { + if ($outdated -and ((Test-Aria2Enabled) -and (get_config 'aria2-warning-enabled' $true))) { warn "Scoop uses 'aria2c' for multi-connection downloads." warn "Should it cause issues, run 'scoop config aria2-enabled false' to disable it." + warn "To disable this warning, run 'scoop config aria2-warning-enabled false'." } if ($outdated.Length -gt 1) { write-host -f DarkCyan "Updating $($outdated.Length) outdated apps:"