Skip to content

Avoid Recursive Shells

Compare
Choose a tag to compare
@osterman osterman released this 10 Mar 21:42
· 6 commits to master since this release

what

  • Export SHELL to match the desired shell, rather than the current sudosh shell
  • Do not use -s as it causes an unnecessary subshell
  • Emulate more closely the behavior of the desired shell (which is why we dropped the --)

why

  • When SHELL was set to the current sudosh wrapper shell, it would cause infinite loops for non-login shells (E.g. where a command was passed via ssh)
  • Better compatibility with system login shells