Strip duplicate variables and aliases
This commit is contained in:
parent
c908a45eeb
commit
e4f3abca2f
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue