We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b88c6eb commit b879e53Copy full SHA for b879e53
1 file changed
scripts/dappnode_uninstall.sh
@@ -6,7 +6,10 @@ if (return 0 2>/dev/null); then
6
return 1
7
fi
8
9
-# Re-exec under bash if invoked by another shell (e.g. zsh)
+# This uninstaller is written for bash. It's safe to *run it from zsh* (it will execute via bash
10
+# thanks to the shebang), but users sometimes invoke it as `zsh ./script.sh` or `source ./script.sh`.
11
+# - If sourced, bail out (sourcing would pollute the current shell and can break it).
12
+# - If invoked by a non-bash shell, re-exec with bash before hitting bash-specific builtins.
13
if [ -z "${BASH_VERSION:-}" ]; then
14
exec /usr/bin/env bash "$0" "$@"
15
0 commit comments