Skip to content

Commit 5b5daa5

Browse files
authored
fix(installed): Use 'System.Nullable<bool>' for param 'global' (#5088)
1 parent 9b4ee87 commit 5b5daa5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
### Bug Fixes
1212

1313
- **core:** Avoid deadlock in `Invoke-ExternalCommand` ([#5064](https://github.com/ScoopInstaller/Scoop/issues/5064))
14+
- **core:** Use 'System.Nullable<bool>' for param 'global' ([#5088](https://github.com/ScoopInstaller/Scoop/issues/5088))
1415
- **install:** Move from cache when `--no-cache` is specified ([#5039](https://github.com/ScoopInstaller/Scoop/issues/5039))
1516
- **scoop-status:** Correct formatting of `Info` output ([#5047](https://github.com/ScoopInstaller/Scoop/issues/5047))
1617

lib/core.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ function cache_path($app, $version, $url) { "$cachedir\$app#$version#$($url -rep
225225

226226
# apps
227227
function sanitary_path($path) { return [regex]::replace($path, "[/\\?:*<>|]", "") }
228-
function installed($app, $global) {
229-
if (-not $PSBoundParameters.ContainsKey('global')) {
228+
function installed($app, [Nullable[bool]]$global) {
229+
if ($null -eq $global) {
230230
return (installed $app $false) -or (installed $app $true)
231231
}
232232
# Dependencies of the format "bucket/dependency" install in a directory of form

0 commit comments

Comments
 (0)