refactor(install): remove stale shell helpers · openclaw/openclaw@adc4d9f
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1656,10 +1656,6 @@ ensure_macos_default_node_active() {
|
1656 | 1656 | return 1 |
1657 | 1657 | } |
1658 | 1658 | |
1659 | | -ensure_macos_node22_active() { |
1660 | | - ensure_macos_default_node_active "$@" |
1661 | | -} |
1662 | | - |
1663 | 1659 | ensure_default_node_active_shell() { |
1664 | 1660 | promote_supported_node_binary || true |
1665 | 1661 | if node_is_at_least_required; then |
@@ -1890,19 +1886,6 @@ is_root() {
|
1890 | 1886 | [[ "$(id -u)" -eq 0 ]] |
1891 | 1887 | } |
1892 | 1888 | |
1893 | | -# Run a command with sudo only if not already root |
1894 | | -maybe_sudo() { |
1895 | | -if is_root; then |
1896 | | -# Skip -E flag when root (env is already preserved) |
1897 | | -if [[ "${1:-}" == "-E" ]]; then |
1898 | | -shift |
1899 | | -fi |
1900 | | -"$@" |
1901 | | -else |
1902 | | - sudo "$@" |
1903 | | -fi |
1904 | | -} |
1905 | | - |
1906 | 1889 | require_sudo() { |
1907 | 1890 | if [[ "$OS" != "linux" ]]; then |
1908 | 1891 | return 0 |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。