diff --git a/scripts/Common/Software/aliae/Manage.ps1 b/scripts/Common/Software/aliae/Manage.ps1 index 779b3474..4163af39 100644 --- a/scripts/Common/Software/aliae/Manage.ps1 +++ b/scripts/Common/Software/aliae/Manage.ps1 @@ -26,7 +26,7 @@ $null = New-Module { Name = "$Name"; Value = "$Value"; } ` - ".alias |= . + [{ name: env.Name, value: env.Value }]" ` + ".alias |= [((. // [])[] | select(.name != env.Name))] + [{ name: env.Name, value: env.Value }]" ` -User $User; } @@ -52,7 +52,7 @@ $null = New-Module { Name = "$Name"; Value = "$Value"; } ` - ".env |= . + [{ name: env.Name, value: env.Value }]" ` + ".env |= [((. // [])[] | select(.name != env.Name))] + [{ name: env.Name, value: env.Value }]" ` -User $User; }