Closed lugray closed 5 years ago
$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin $ mkdir -p demo/.shadowenv.d $ echo '(env/append-to-pathlist "PATH" "/sentinel")' > demo/.shadowenv.d/demo.lisp $ cd demo shadowenv failure: directory contains untrusted shadowenv program: shadowenv help trust to learn more. $ shadowenv trust activated shadowenv $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/sentinel $ cd .. deactivated shadowenv $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
It's worth noting that the behaviour is already allowed, this just makes it easier and more clear:
(if (null (env/get "PATH")) (env/set "PATH" "/sentinel") (env/set "PATH" (concat (env/get "PATH") ":/sentinel" )))
It's worth noting that the behaviour is already allowed, this just makes it easier and more clear: