From aedb209e8eab31d5568f3c569a853915a4290454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Mon, 27 Feb 2023 19:25:41 +0200 Subject: [PATCH] Simplify environment lookup in Nushell activation (#2506) --- docs/changelog/2506.feature.rst | 1 + src/virtualenv/activation/nushell/activate.nu | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/2506.feature.rst diff --git a/docs/changelog/2506.feature.rst b/docs/changelog/2506.feature.rst new file mode 100644 index 000000000..3e69002a3 --- /dev/null +++ b/docs/changelog/2506.feature.rst @@ -0,0 +1 @@ +Change environment variable existence check in Nushell activation script to not use deprecated command. diff --git a/src/virtualenv/activation/nushell/activate.nu b/src/virtualenv/activation/nushell/activate.nu index 5e5ee26a5..6357c8d6f 100644 --- a/src/virtualenv/activation/nushell/activate.nu +++ b/src/virtualenv/activation/nushell/activate.nu @@ -12,7 +12,7 @@ export-env { } def has-env [name: string] { - $name in (env).name + $name in $env } # Emulates a `test -z`, but btter as it handles e.g 'false'