mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-24 06:15:44 +00:00
refactor(config): Fix set_config
This commit is contained in:
+5
-1
@@ -96,7 +96,11 @@ function set_config($name, $value) {
|
||||
if($value -eq [bool]::TrueString -or $value -eq [bool]::FalseString) {
|
||||
$value = [System.Convert]::ToBoolean($value)
|
||||
}
|
||||
$scoopConfig | Add-Member -MemberType NoteProperty -Name $name -Value $value
|
||||
if($scoopConfig.$name) {
|
||||
$scoopConfig.$name = $value
|
||||
} else {
|
||||
$scoopConfig | Add-Member -MemberType NoteProperty -Name $name -Value $value
|
||||
}
|
||||
}
|
||||
|
||||
if($null -eq $value) {
|
||||
|
||||
Reference in New Issue
Block a user