Skip to content

Commit 0b1df8d

Browse files
committed
Show the "nuking the root" effect
Environment variables registered in variables.sh remain even on opam env for a different switch.
1 parent 5961111 commit 0b1df8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/reftests/init-scripts.unix.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,8 @@ alias precmd 'eval `opam env --shell=csh --readonly`'
138138
# Return code 1 #
139139
### test -f root/opam-init/env_hook.ps1
140140
# Return code 1 #
141+
### opam switch create fake2 --empty --root root
142+
### # Simulate nuking a root entirely
143+
### rm -rf root/fake2
144+
### sh locally-in-sh.sh sh -lc "opam exec --root root --switch=fake -- env" | grep -v MANPATH | grep /root/fake2/ | '=.*' -> ''
145+
PATH

0 commit comments

Comments
 (0)