Skip to content

Commit 4357971

Browse files
authored
fix(env): Publish environment change when deleting variable (#5631)
* fix(env): Publish environment change when deleting variable * Update CHANGELOG.md
1 parent aa09601 commit 4357971

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- **core:** Fix `is_in_dir` under Unix ([#5391](https://github.com/ScoopInstaller/Scoop/issues/5391))
1919
- **core:** Rewrite config file when needed ([#5439](https://github.com/ScoopInstaller/Scoop/issues/5439))
2020
- **core:** Prevents leaking HTTP(S)_PROXY env vars to current sessions after Invoke-Git in parallel execution ([#5436](https://github.com/ScoopInstaller/Scoop/pull/5436))
21-
- **env:** Avoid automatic expansion of `%%` in env ([#5395](https://github.com/ScoopInstaller/Scoop/issues/5395), [#5452](https://github.com/ScoopInstaller/Scoop/pull/5452))
21+
- **env:** Avoid automatic expansion of `%%` in env ([#5395](https://github.com/ScoopInstaller/Scoop/issues/5395), [#5452](https://github.com/ScoopInstaller/Scoop/pull/5452), [#5631](https://github.com/ScoopInstaller/Scoop/pull/5631))
2222
- **install:** Fix download from private GitHub repositories ([#5361](https://github.com/ScoopInstaller/Scoop/issues/5361))
2323
- **scoop-info:** Fix errors in file size collection when `--verbose` ([#5352](https://github.com/ScoopInstaller/Scoop/pull/5352))
2424
- **shim:** Use bash executable directly ([#5433](https://github.com/ScoopInstaller/Scoop/issues/5433))

lib/core.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ function env($name, $global, $val = '__get') {
699699
$EnvRegisterKey.GetValue($name, $null, $RegistryValueOption)
700700
} elseif ($val -eq $null) {
701701
$EnvRegisterKey.DeleteValue($name)
702+
Publish-Env
702703
} else {
703704
$RegistryValueKind = if ($val.Contains('%')) {
704705
[Microsoft.Win32.RegistryValueKind]::ExpandString

0 commit comments

Comments
 (0)