refactor(install): remove stale shell helpers

This commit is contained in:
Vincent Koc
2026-06-23 06:04:21 +08:00
parent 75af913ba6
commit adc4d9fe02

View File

@@ -1656,10 +1656,6 @@ ensure_macos_default_node_active() {
return 1
}
ensure_macos_node22_active() {
ensure_macos_default_node_active "$@"
}
ensure_default_node_active_shell() {
promote_supported_node_binary || true
if node_is_at_least_required; then
@@ -1890,19 +1886,6 @@ is_root() {
[[ "$(id -u)" -eq 0 ]]
}
# Run a command with sudo only if not already root
maybe_sudo() {
if is_root; then
# Skip -E flag when root (env is already preserved)
if [[ "${1:-}" == "-E" ]]; then
shift
fi
"$@"
else
sudo "$@"
fi
}
require_sudo() {
if [[ "$OS" != "linux" ]]; then
return 0