Skip to content

Commit 17bfcfe

Browse files
ilyam8Copilot
andauthored
fix(edit-config): ignore container variable inherited from /etc/profile (#21505)
Co-authored-by: Copilot <[email protected]>
1 parent 4ca9ece commit 17bfcfe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

system/edit-config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
#!/usr/bin/env sh
22

3+
if [ "${container+x}" = "x" ]; then
4+
_container_saved=$container
5+
fi
6+
37
# shellcheck disable=SC1091
48
[ -f /etc/profile ] && . /etc/profile
59

10+
if [ "${_container_saved+x}" = "x" ]; then
11+
container=$_container_saved
12+
else
13+
unset container
14+
fi
15+
616
set -e
717

818
script_dir="$(CDPATH="" cd -- "$(dirname -- "$0")" && pwd -P)"

0 commit comments

Comments
 (0)