karnel-termux 4.17.37 → 4.17.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/karnel/RELEASE_COMMIT +1 -1
  2. package/karnel/tools/ai/antigravity-cli/install.sh +2 -1
  3. package/karnel/tools/ai/cactus-needle/install.sh +2 -1
  4. package/karnel/tools/ai/claude-code/install.sh +2 -0
  5. package/karnel/tools/ai/cline/install.sh +2 -0
  6. package/karnel/tools/ai/codex/install.sh +2 -1
  7. package/karnel/tools/ai/command-code/install.sh +4 -1
  8. package/karnel/tools/ai/copilot-termux/install.sh +4 -1
  9. package/karnel/tools/ai/crush/install.sh +2 -0
  10. package/karnel/tools/ai/ctx7/install.sh +2 -4
  11. package/karnel/tools/ai/droid/install.sh +2 -1
  12. package/karnel/tools/ai/engram/install.sh +2 -1
  13. package/karnel/tools/ai/freebuff/install.sh +4 -1
  14. package/karnel/tools/ai/gemini-cli/install.sh +2 -1
  15. package/karnel/tools/ai/gentle-ai/install.sh +2 -1
  16. package/karnel/tools/ai/keelcode/install.sh +2 -0
  17. package/karnel/tools/ai/kimchi-code/install.sh +2 -1
  18. package/karnel/tools/ai/kimi-code/install.sh +2 -1
  19. package/karnel/tools/ai/minimax-cli/install.sh +2 -1
  20. package/karnel/tools/ai/mistral-vibe/install.sh +2 -1
  21. package/karnel/tools/ai/odysseus/install.sh +2 -1
  22. package/karnel/tools/ai/oh-my-pi/install.sh +2 -1
  23. package/karnel/tools/ai/ollama/install.sh +2 -1
  24. package/karnel/tools/ai/omni-route/install.sh +2 -0
  25. package/karnel/tools/ai/openclaude/install.sh +2 -1
  26. package/karnel/tools/ai/openclaw/install.sh +2 -1
  27. package/karnel/tools/ai/opencode/install.sh +4 -1
  28. package/karnel/tools/ai/openspec/install.sh +2 -4
  29. package/karnel/tools/ai/pi/install.sh +2 -1
  30. package/karnel/tools/ai/qwen-code/install.sh +2 -1
  31. package/karnel/tools/ai/supercode-cli/install.sh +4 -1
  32. package/karnel/tools/ai/walkie/install.sh +4 -1
  33. package/karnel/tools/auto/n8n/install.sh +2 -1
  34. package/karnel/tools/db/mariadb/install.sh +2 -1
  35. package/karnel/tools/db/mongodb/install.sh +2 -1
  36. package/karnel/tools/db/postgresql/install.sh +2 -1
  37. package/karnel/tools/db/redis/install.sh +2 -1
  38. package/karnel/tools/db/sqlite/install.sh +2 -1
  39. package/karnel/tools/deploy/railway/install.sh +2 -1
  40. package/karnel/tools/dev/bat/install.sh +2 -1
  41. package/karnel/tools/dev/bc/install.sh +2 -1
  42. package/karnel/tools/dev/cloudflared/install.sh +2 -1
  43. package/karnel/tools/dev/curl/install.sh +2 -1
  44. package/karnel/tools/dev/fzf/install.sh +2 -1
  45. package/karnel/tools/dev/gh/install.sh +2 -1
  46. package/karnel/tools/dev/html2text/install.sh +2 -1
  47. package/karnel/tools/dev/imagemagick/install.sh +2 -1
  48. package/karnel/tools/dev/jq/install.sh +2 -1
  49. package/karnel/tools/dev/lsd/install.sh +2 -1
  50. package/karnel/tools/dev/make/install.sh +2 -1
  51. package/karnel/tools/dev/ncurses/install.sh +2 -1
  52. package/karnel/tools/dev/openssh/install.sh +2 -1
  53. package/karnel/tools/dev/proot/install.sh +2 -1
  54. package/karnel/tools/dev/shfmt/install.sh +2 -1
  55. package/karnel/tools/dev/snyk/install.sh +2 -1
  56. package/karnel/tools/dev/tmate/install.sh +2 -1
  57. package/karnel/tools/dev/tmux/install.sh +2 -1
  58. package/karnel/tools/dev/translate/install.sh +2 -1
  59. package/karnel/tools/dev/tree/install.sh +2 -1
  60. package/karnel/tools/dev/udocker/install.sh +2 -1
  61. package/karnel/tools/dev/wget/install.sh +2 -1
  62. package/karnel/tools/editor/neovim/install.sh +2 -1
  63. package/karnel/tools/games/arcade/install.sh +2 -1
  64. package/karnel/tools/games/buzz/install.sh +2 -1
  65. package/karnel/tools/games/ctfgod/install.sh +2 -1
  66. package/karnel/tools/games/detective/install.sh +2 -1
  67. package/karnel/tools/games/pet-friends/install.sh +2 -1
  68. package/karnel/tools/games/tamagotchi/install.sh +2 -1
  69. package/karnel/tools/lang/bun/install.sh +2 -1
  70. package/karnel/tools/lang/clang/install.sh +2 -1
  71. package/karnel/tools/lang/golang/install.sh +2 -1
  72. package/karnel/tools/lang/nodejs/install.sh +2 -1
  73. package/karnel/tools/lang/perl/install.sh +2 -1
  74. package/karnel/tools/lang/php/install.sh +2 -1
  75. package/karnel/tools/lang/python/install.sh +2 -1
  76. package/karnel/tools/lang/rust/install.sh +2 -1
  77. package/karnel/tools/network/dark/install.sh +2 -1
  78. package/karnel/tools/network/dedsec-network/install.sh +2 -1
  79. package/karnel/tools/npm/live-server/install.sh +2 -1
  80. package/karnel/tools/npm/localtunnel/install.sh +2 -1
  81. package/karnel/tools/npm/markserv/install.sh +2 -1
  82. package/karnel/tools/npm/ncu/install.sh +2 -1
  83. package/karnel/tools/npm/nestjs/install.sh +2 -1
  84. package/karnel/tools/npm/ngrok/install.sh +2 -1
  85. package/karnel/tools/npm/prettier/install.sh +2 -1
  86. package/karnel/tools/npm/psqlformat/install.sh +2 -1
  87. package/karnel/tools/npm/typescript/install.sh +2 -1
  88. package/karnel/tools/npm/vercel/install.sh +2 -1
  89. package/karnel/tools/security/aircrack-ng/install.sh +2 -1
  90. package/karnel/tools/security/binwalk/install.sh +2 -1
  91. package/karnel/tools/security/dirb/install.sh +2 -1
  92. package/karnel/tools/security/dnsrecon/install.sh +2 -1
  93. package/karnel/tools/security/enum4linux/install.sh +2 -1
  94. package/karnel/tools/security/exiftool/install.sh +2 -1
  95. package/karnel/tools/security/foremost/install.sh +2 -1
  96. package/karnel/tools/security/hashcat/install.sh +2 -1
  97. package/karnel/tools/security/hydra/install.sh +2 -1
  98. package/karnel/tools/security/john/install.sh +2 -1
  99. package/karnel/tools/security/masscan/install.sh +2 -1
  100. package/karnel/tools/security/metasploit/install.sh +2 -1
  101. package/karnel/tools/security/netcat/install.sh +2 -1
  102. package/karnel/tools/security/nikto/install.sh +2 -1
  103. package/karnel/tools/security/nmap/install.sh +2 -1
  104. package/karnel/tools/security/smbclient/install.sh +2 -1
  105. package/karnel/tools/security/sqlmap/install.sh +2 -1
  106. package/karnel/tools/security/steghide/install.sh +2 -1
  107. package/karnel/tools/security/tcpdump/install.sh +2 -1
  108. package/karnel/tools/security/theharvester/install.sh +2 -1
  109. package/karnel/tools/security/wafw00f/install.sh +2 -1
  110. package/karnel/tools/security/whatweb/install.sh +2 -1
  111. package/karnel/tools/security/whois/install.sh +2 -1
  112. package/karnel/tools/security/wpscan/install.sh +2 -1
  113. package/karnel/tools/shell/better-npm/install.sh +2 -1
  114. package/karnel/tools/shell/fzf-tab/install.sh +2 -1
  115. package/karnel/tools/shell/history-substring/install.sh +2 -1
  116. package/karnel/tools/shell/powerlevel10k/install.sh +2 -1
  117. package/karnel/tools/shell/you-should-use/install.sh +2 -1
  118. package/karnel/tools/shell/zsh-autopair/install.sh +2 -1
  119. package/karnel/tools/shell/zsh-autosuggestions/install.sh +2 -1
  120. package/karnel/tools/shell/zsh-completions/install.sh +2 -1
  121. package/karnel/tools/shell/zsh-defer/install.sh +2 -1
  122. package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +2 -1
  123. package/karnel/tools/ui/banner/install.sh +2 -1
  124. package/karnel/tools/ui/cursor/install.sh +2 -1
  125. package/karnel/tools/ui/extra-keys/install.sh +2 -1
  126. package/karnel/tools/ui/font/install.sh +2 -1
  127. package/karnel/tools/utils/applaunch/install.sh +2 -1
  128. package/karnel/tools/utils/fconv/install.sh +2 -1
  129. package/karnel/tools/utils/filecheck/install.sh +2 -1
  130. package/karnel/tools/utils/httptmux/install.sh +2 -1
  131. package/karnel/tools/utils/notes/install.sh +2 -1
  132. package/karnel/tools/utils/passman/install.sh +2 -1
  133. package/karnel/tools/utils/qrcode/install.sh +2 -1
  134. package/karnel/tools/utils/splash/install.sh +2 -1
  135. package/karnel/tools/utils/treex/install.sh +2 -1
  136. package/karnel/tools/utils/websites/install.sh +2 -1
  137. package/karnel/tools/utils/zork/install.sh +2 -1
  138. package/package.json +1 -1
@@ -1 +1 @@
1
- a175813fae11dcb0b9a2e5653f1bfcceccbec70a
1
+ ee13190902001f296407915cfd209ab46448f17f
@@ -483,6 +483,7 @@ PY
483
483
  }
484
484
 
485
485
  reinstall_antigravity_cli() {
486
- uninstall_antigravity_cli
486
+ uninstall_antigravity_cli || [[ $? -eq 2 ]] || return 1
487
+
487
488
  install_antigravity_cli
488
489
  }
@@ -366,6 +366,7 @@ _update_cactus_needle_impl() {
366
366
  }
367
367
 
368
368
  reinstall_cactus_needle() {
369
- uninstall_cactus_needle
369
+ uninstall_cactus_needle || [[ $? -eq 2 ]] || return 1
370
+
370
371
  install_cactus_needle
371
372
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -175,6 +176,7 @@ _install_claude_proot_impl() {
175
176
  export TMPDIR=/tmp
176
177
  export HOME=/root
177
178
  npm install -g @anthropic-ai/claude-code@2.1.226
179
+ _fix_npm_shebang "claude-code" || return 1
178
180
  ' &>>"$LOG_FILE"
179
181
 
180
182
  local ubuntu_root
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -124,6 +125,7 @@ _cline_install_global() {
124
125
 
125
126
  _cline_install_global_impl() {
126
127
  if ! npm i -g cline &>>"$LOG_FILE"; then
128
+ _fix_npm_shebang "cline" || return 1
127
129
  log_error "Failed to install cline via npm"
128
130
  return 1
129
131
  fi
@@ -97,6 +97,7 @@ _update_codex_impl() {
97
97
  }
98
98
 
99
99
  reinstall_codex() {
100
- uninstall_codex
100
+ uninstall_codex || [[ $? -eq 2 ]] || return 1
101
+
101
102
  install_codex
102
103
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -69,6 +70,7 @@ _install_command_code_npm_impl() {
69
70
  fi
70
71
 
71
72
  if ! (cd "$COMMAND_CODE_DATA_DIR" && npm install command-code@latest &>>"$LOG_FILE"); then
73
+ _fix_npm_shebang "command-code" || return 1
72
74
  log_error "Failed to install command-code package"
73
75
  return 1
74
76
  fi
@@ -168,6 +170,7 @@ _update_command_code_impl() {
168
170
  }
169
171
 
170
172
  reinstall_command_code() {
171
- uninstall_command_code
173
+ uninstall_command_code || [[ $? -eq 2 ]] || return 1
174
+
172
175
  install_command_code
173
176
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -20,6 +21,7 @@ install_copilot_termux() {
20
21
  fi
21
22
 
22
23
  if ! npm install -g @bash0816/copilot-termux &>>"$LOG_FILE"; then
24
+ _fix_npm_shebang "copilot-termux" || return 1
23
25
  log_error "Failed to install Copilot-Termux via npm"
24
26
  return 1
25
27
  fi
@@ -75,6 +77,7 @@ _do_update_copilot_termux() {
75
77
  }
76
78
 
77
79
  reinstall_copilot_termux() {
78
- uninstall_copilot_termux
80
+ uninstall_copilot_termux || [[ $? -eq 2 ]] || return 1
81
+
79
82
  install_copilot_termux
80
83
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -25,6 +26,7 @@ install_crush() {
25
26
  if command -v npm &>/dev/null; then
26
27
  log_info "Attempting npm install..."
27
28
  if npm install -g @charmland/crush &>>"$LOG_FILE"; then
29
+ _fix_npm_shebang "crush" || return 1
28
30
  if command -v crush &>/dev/null; then
29
31
  record_managed_file "$(command -v crush)" "$CRUSH_MARKER" || return 1
30
32
  log_success "Crush installed via npm"
@@ -6,6 +6,7 @@
6
6
  # Official: npm install -g ctx7
7
7
  import "@/utils/log"
8
8
  import "@/utils/version"
9
+ import "@/utils/npm-shebang"
9
10
 
10
11
  install_ctx7() {
11
12
  if command -v ctx7 &>/dev/null; then
@@ -23,10 +24,7 @@ install_ctx7() {
23
24
  log_info "Installing ctx7 (Context7 documentation provider)..."
24
25
  npm install -g ctx7 2>/dev/null
25
26
  local rc=$?
26
-
27
- local _t
28
- _t=$(readlink -f "$PREFIX/bin/ctx7" 2>/dev/null)
29
- [ -f "$_t" ] && sed -i '1s|^#!/usr/bin/env node|#!/data/data/com.termux/files/usr/bin/env node|' "$_t"
27
+ _fix_npm_shebang "ctx7" || true
30
28
 
31
29
  if [[ $rc -eq 0 ]] && command -v ctx7 &>/dev/null; then
32
30
  log_success "ctx7 installed successfully"
@@ -484,6 +484,7 @@ update_droid() {
484
484
  # ===== REINSTALL =====
485
485
 
486
486
  reinstall_droid() {
487
- uninstall_droid
487
+ uninstall_droid || [[ $? -eq 2 ]] || return 1
488
+
488
489
  install_droid
489
490
  }
@@ -161,6 +161,7 @@ _update_engram_impl() {
161
161
  }
162
162
 
163
163
  reinstall_engram() {
164
- uninstall_engram
164
+ uninstall_engram || [[ $? -eq 2 ]] || return 1
165
+
165
166
  install_engram
166
167
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -18,6 +19,7 @@ install_freebuff() {
18
19
 
19
20
  log_info "Installing Freebuff..."
20
21
  npm install -g freebuff || {
22
+ _fix_npm_shebang "freebuff" || return 1
21
23
  log_error "Failed to install Freebuff"
22
24
  return 1
23
25
  }
@@ -69,6 +71,7 @@ _do_update_freebuff() {
69
71
  }
70
72
 
71
73
  reinstall_freebuff() {
72
- uninstall_freebuff
74
+ uninstall_freebuff || [[ $? -eq 2 ]] || return 1
75
+
73
76
  install_freebuff
74
77
  }
@@ -104,6 +104,7 @@ _update_gemini_cli_impl() {
104
104
  }
105
105
 
106
106
  reinstall_gemini_cli() {
107
- uninstall_gemini_cli
107
+ uninstall_gemini_cli || [[ $? -eq 2 ]] || return 1
108
+
108
109
  install_gemini_cli
109
110
  }
@@ -266,6 +266,7 @@ _do_update_gentle_ai() {
266
266
  }
267
267
 
268
268
  reinstall_gentle_ai() {
269
- uninstall_gentle_ai
269
+ uninstall_gentle_ai || [[ $? -eq 2 ]] || return 1
270
+
270
271
  install_gentle_ai
271
272
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -187,6 +188,7 @@ install_keelcode() {
187
188
  log_info "Installing KeelCode..."
188
189
  local output rc
189
190
  output="$(npm install -g "$KEELCODE_PACKAGE" --force 2>&1)"
191
+ _fix_npm_shebang "keelcode" || return 1
190
192
  rc=$?
191
193
  printf '%s\n' "$output" | tail -3
192
194
  if ((rc != 0)); then
@@ -520,6 +520,7 @@ _update_kimchi_proot_impl() {
520
520
  # ===== REINSTALL =====
521
521
 
522
522
  reinstall_kimchi_code() {
523
- uninstall_kimchi_code
523
+ uninstall_kimchi_code || [[ $? -eq 2 ]] || return 1
524
+
524
525
  install_kimchi_code
525
526
  }
@@ -99,6 +99,7 @@ _update_kimi_code_impl() {
99
99
  }
100
100
 
101
101
  reinstall_kimi_code() {
102
- uninstall_kimi_code
102
+ uninstall_kimi_code || [[ $? -eq 2 ]] || return 1
103
+
103
104
  install_kimi_code
104
105
  }
@@ -99,6 +99,7 @@ _update_minimax_cli_impl() {
99
99
  }
100
100
 
101
101
  reinstall_minimax_cli() {
102
- uninstall_minimax_cli
102
+ uninstall_minimax_cli || [[ $? -eq 2 ]] || return 1
103
+
103
104
  install_minimax_cli
104
105
  }
@@ -112,6 +112,7 @@ _update_mistral_vibe_impl() {
112
112
  }
113
113
 
114
114
  reinstall_mistral_vibe() {
115
- uninstall_mistral_vibe
115
+ uninstall_mistral_vibe || [[ $? -eq 2 ]] || return 1
116
+
116
117
  install_mistral_vibe
117
118
  }
@@ -472,6 +472,7 @@ update_odysseus() {
472
472
  # ===== REINSTALL =====
473
473
 
474
474
  reinstall_odysseus() {
475
- uninstall_odysseus
475
+ uninstall_odysseus || [[ $? -eq 2 ]] || return 1
476
+
476
477
  install_odysseus
477
478
  }
@@ -323,6 +323,7 @@ update_oh_my_pi() {
323
323
  }
324
324
 
325
325
  reinstall_oh_my_pi() {
326
- uninstall_oh_my_pi
326
+ uninstall_oh_my_pi || [[ $? -eq 2 ]] || return 1
327
+
327
328
  install_oh_my_pi
328
329
  }
@@ -68,6 +68,7 @@ _update_ollama_impl() {
68
68
  }
69
69
 
70
70
  reinstall_ollama() {
71
- uninstall_ollama
71
+ uninstall_ollama || [[ $? -eq 2 ]] || return 1
72
+
72
73
  install_ollama
73
74
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -136,6 +137,7 @@ install_omni_route() {
136
137
 
137
138
  log_info "Installing omniRoute (this may take a while)..."
138
139
  if command -v npm >/dev/null 2>&1 && npm i karnelroute --prefix "$OMNI_ROUTE_PKG" 2>>"$LOG_FILE"; then
140
+ _fix_npm_shebang "omni-route" || return 1
139
141
  sed -i '1s|^#!/usr/bin/env node|#!'"$PREFIX"'/bin/node|' "$OMNI_ROUTE_LOCAL_BIN" 2>/dev/null
140
142
  _omni_route_wrap_and_fix
141
143
  if _omni_route_ok; then
@@ -103,6 +103,7 @@ _update_openclaude_impl() {
103
103
  }
104
104
 
105
105
  reinstall_openclaude() {
106
- uninstall_openclaude
106
+ uninstall_openclaude || [[ $? -eq 2 ]] || return 1
107
+
107
108
  install_openclaude
108
109
  }
@@ -108,6 +108,7 @@ _update_openclaw_impl() {
108
108
  }
109
109
 
110
110
  reinstall_openclaw() {
111
- uninstall_openclaw
111
+ uninstall_openclaw || [[ $? -eq 2 ]] || return 1
112
+
112
113
  install_openclaw
113
114
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -94,6 +95,7 @@ _install_opencode_proot_impl() {
94
95
  export TMPDIR=/tmp
95
96
  export HOME=/root
96
97
  npm install -g opencode-ai@1.18.15
98
+ _fix_npm_shebang "opencode" || return 1
97
99
  ' &>>"$LOG_FILE"
98
100
 
99
101
  proot_ubuntu /bin/bash -c 'touch /root/.opencode/.karnel-managed' &>>"$LOG_FILE"
@@ -208,6 +210,7 @@ _do_update_opencode() {
208
210
  }
209
211
 
210
212
  reinstall_opencode() {
211
- uninstall_opencode
213
+ uninstall_opencode || [[ $? -eq 2 ]] || return 1
214
+
212
215
  install_opencode
213
216
  }
@@ -6,6 +6,7 @@
6
6
  # Official: npm install -g @fission-ai/openspec@latest
7
7
  import "@/utils/log"
8
8
  import "@/utils/version"
9
+ import "@/utils/npm-shebang"
9
10
 
10
11
  install_openspec() {
11
12
  if command -v openspec &>/dev/null; then
@@ -23,10 +24,7 @@ install_openspec() {
23
24
  log_info "Installing openspec (Spec-Driven Development framework)..."
24
25
  npm install -g @fission-ai/openspec@latest 2>/dev/null
25
26
  local rc=$?
26
-
27
- local _t
28
- _t=$(readlink -f "$PREFIX/bin/openspec" 2>/dev/null)
29
- [ -f "$_t" ] && sed -i '1s|^#!/usr/bin/env node|#!/data/data/com.termux/files/usr/bin/env node|' "$_t"
27
+ _fix_npm_shebang "openspec" || true
30
28
 
31
29
  if [[ $rc -eq 0 ]] && command -v openspec &>/dev/null; then
32
30
  log_success "openspec installed successfully"
@@ -97,6 +97,7 @@ _update_pi_impl() {
97
97
  }
98
98
 
99
99
  reinstall_pi() {
100
- uninstall_pi
100
+ uninstall_pi || [[ $? -eq 2 ]] || return 1
101
+
101
102
  install_pi
102
103
  }
@@ -104,6 +104,7 @@ _update_qwen_code_impl() {
104
104
  }
105
105
 
106
106
  reinstall_qwen_code() {
107
- uninstall_qwen_code
107
+ uninstall_qwen_code || [[ $? -eq 2 ]] || return 1
108
+
108
109
  install_qwen_code
109
110
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/version"
@@ -18,6 +19,7 @@ install_supercode_cli() {
18
19
  log_info "Installing Supercode CLI..."
19
20
  local output rc
20
21
  output="$(npm install -g supercode-cli 2>&1)"
22
+ _fix_npm_shebang "supercode-cli" || return 1
21
23
  rc=$?
22
24
  printf '%s\n' "$output" | tail -3
23
25
  if ((rc != 0)); then
@@ -82,6 +84,7 @@ _do_update_supercode_cli() {
82
84
  }
83
85
 
84
86
  reinstall_supercode_cli() {
85
- uninstall_supercode_cli
87
+ uninstall_supercode_cli || [[ $? -eq 2 ]] || return 1
88
+
86
89
  install_supercode_cli
87
90
  }
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
+ import "@/utils/npm-shebang"
2
3
 
3
4
  import "@/utils/log"
4
5
  import "@/utils/colors"
@@ -124,6 +125,7 @@ _walkie_install_global() {
124
125
  local spec="$1"
125
126
 
126
127
  if ! npm install -g "$spec" --no-audit --no-fund --no-bin-links --allow-scripts=walkie-sh,udx-native,sodium-native &>>"$LOG_FILE"; then
128
+ _fix_npm_shebang "walkie" || return 1
127
129
  log_warn "npm install failed, trying with --ignore-scripts..."
128
130
  npm install -g "$spec" --no-audit --no-fund --no-bin-links --allow-scripts=walkie-sh,udx-native,sodium-native --ignore-scripts &>>"$LOG_FILE"
129
131
  fi
@@ -657,6 +659,7 @@ update_walkie() {
657
659
  }
658
660
 
659
661
  reinstall_walkie() {
660
- uninstall_walkie
662
+ uninstall_walkie || [[ $? -eq 2 ]] || return 1
663
+
661
664
  install_walkie
662
665
  }
@@ -97,6 +97,7 @@ update_n8n() {
97
97
  }
98
98
 
99
99
  reinstall_n8n() {
100
- uninstall_n8n
100
+ uninstall_n8n || [[ $? -eq 2 ]] || return 1
101
+
101
102
  install_n8n
102
103
  }
@@ -60,6 +60,7 @@ update_mariadb() {
60
60
  }
61
61
 
62
62
  reinstall_mariadb() {
63
- uninstall_mariadb
63
+ uninstall_mariadb || [[ $? -eq 2 ]] || return 1
64
+
64
65
  install_mariadb
65
66
  }
@@ -71,6 +71,7 @@ update_mongodb() {
71
71
  }
72
72
 
73
73
  reinstall_mongodb() {
74
- uninstall_mongodb
74
+ uninstall_mongodb || [[ $? -eq 2 ]] || return 1
75
+
75
76
  install_mongodb
76
77
  }
@@ -60,6 +60,7 @@ update_postgresql() {
60
60
  }
61
61
 
62
62
  reinstall_postgresql() {
63
- uninstall_postgresql
63
+ uninstall_postgresql || [[ $? -eq 2 ]] || return 1
64
+
64
65
  install_postgresql
65
66
  }
@@ -61,6 +61,7 @@ update_redis() {
61
61
  }
62
62
 
63
63
  reinstall_redis() {
64
- uninstall_redis
64
+ uninstall_redis || [[ $? -eq 2 ]] || return 1
65
+
65
66
  install_redis
66
67
  }
@@ -60,6 +60,7 @@ update_sqlite() {
60
60
  }
61
61
 
62
62
  reinstall_sqlite() {
63
- uninstall_sqlite
63
+ uninstall_sqlite || [[ $? -eq 2 ]] || return 1
64
+
64
65
  install_sqlite
65
66
  }
@@ -228,6 +228,7 @@ _do_update_railway() {
228
228
  }
229
229
 
230
230
  reinstall_railway() {
231
- uninstall_railway
231
+ uninstall_railway || [[ $? -eq 2 ]] || return 1
232
+
232
233
  install_railway
233
234
  }
@@ -73,6 +73,7 @@ update_bat() {
73
73
  }
74
74
 
75
75
  reinstall_bat() {
76
- uninstall_bat
76
+ uninstall_bat || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_bat
78
79
  }
@@ -73,6 +73,7 @@ update_bc() {
73
73
  }
74
74
 
75
75
  reinstall_bc() {
76
- uninstall_bc
76
+ uninstall_bc || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_bc
78
79
  }
@@ -73,6 +73,7 @@ update_cloudflared() {
73
73
  }
74
74
 
75
75
  reinstall_cloudflared() {
76
- uninstall_cloudflared
76
+ uninstall_cloudflared || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_cloudflared
78
79
  }
@@ -73,6 +73,7 @@ update_curl() {
73
73
  }
74
74
 
75
75
  reinstall_curl() {
76
- uninstall_curl
76
+ uninstall_curl || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_curl
78
79
  }
@@ -102,6 +102,7 @@ update_fzf() {
102
102
  }
103
103
 
104
104
  reinstall_fzf() {
105
- uninstall_fzf
105
+ uninstall_fzf || [[ $? -eq 2 ]] || return 1
106
+
106
107
  install_fzf
107
108
  }
@@ -73,6 +73,7 @@ update_gh() {
73
73
  }
74
74
 
75
75
  reinstall_gh() {
76
- uninstall_gh
76
+ uninstall_gh || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_gh
78
79
  }
@@ -73,6 +73,7 @@ update_html2text() {
73
73
  }
74
74
 
75
75
  reinstall_html2text() {
76
- uninstall_html2text
76
+ uninstall_html2text || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_html2text
78
79
  }
@@ -73,6 +73,7 @@ update_imagemagick() {
73
73
  }
74
74
 
75
75
  reinstall_imagemagick() {
76
- uninstall_imagemagick
76
+ uninstall_imagemagick || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_imagemagick
78
79
  }
@@ -73,6 +73,7 @@ update_jq() {
73
73
  }
74
74
 
75
75
  reinstall_jq() {
76
- uninstall_jq
76
+ uninstall_jq || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_jq
78
79
  }
@@ -73,6 +73,7 @@ update_lsd() {
73
73
  }
74
74
 
75
75
  reinstall_lsd() {
76
- uninstall_lsd
76
+ uninstall_lsd || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_lsd
78
79
  }
@@ -73,6 +73,7 @@ update_make() {
73
73
  }
74
74
 
75
75
  reinstall_make() {
76
- uninstall_make
76
+ uninstall_make || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_make
78
79
  }
@@ -73,6 +73,7 @@ update_ncurses() {
73
73
  }
74
74
 
75
75
  reinstall_ncurses() {
76
- uninstall_ncurses
76
+ uninstall_ncurses || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_ncurses
78
79
  }
@@ -73,6 +73,7 @@ update_openssh() {
73
73
  }
74
74
 
75
75
  reinstall_openssh() {
76
- uninstall_openssh
76
+ uninstall_openssh || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_openssh
78
79
  }
@@ -73,6 +73,7 @@ update_proot() {
73
73
  }
74
74
 
75
75
  reinstall_proot() {
76
- uninstall_proot
76
+ uninstall_proot || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_proot
78
79
  }
@@ -73,6 +73,7 @@ update_shfmt() {
73
73
  }
74
74
 
75
75
  reinstall_shfmt() {
76
- uninstall_shfmt
76
+ uninstall_shfmt || [[ $? -eq 2 ]] || return 1
77
+
77
78
  install_shfmt
78
79
  }