fix(edit-config): ignore container variable inherited from /etc/profile (#21505)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Ilya Mashchenko committed
Dec 27, 2025 at 16:57 UTC
17bfcfeb3640f74fdc6bc98b9aeda2f504d452fd
1 file changed
+10
system/edit-config
+10
@@ -1,8 +1,18 @@
1
#!/usr/bin/env sh
2
3
+if [ "${container+x}" = "x" ]; then
4
+ _container_saved=$container
5
+fi
6
+
7
# shellcheck disable=SC1091
8
[ -f /etc/profile ] && . /etc/profile
9
10
+if [ "${_container_saved+x}" = "x" ]; then
11
+ container=$_container_saved
12
+else
13
+ unset container
14
+fi
15
+
16
set -e
17
18
script_dir="$(CDPATH="" cd -- "$(dirname -- "$0")" && pwd -P)"