fix: Executor arguments getting ignored#2176
Conversation
Greptile SummaryThis PR fixes a bug where commands passed to the Alpine init script by the Executor component were silently ignored — the script would run all of its initialization logic and then exit without ever running the requested command. The fix inserts an early
Confidence Score: 5/5Safe to merge — the exec short-circuit is the right approach for passing through executor commands, and it only fires in well-scoped conditions (no INSTALLING flag, args present, first arg not a --prefixed token). The change is narrow and targeted: it adds a single early-exit exec path and a cosmetic blank-line fix. The exec guard correctly exempts the installation path, and the common invocation patterns all behave as expected. The only gap is the -- sentinel interaction flagged as a comment, which is unlikely to be hit in practice by any current caller. No files require special attention beyond the exec guard condition in src/plugins/terminal/scripts/init-alpine.sh. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[init-alpine.sh called] --> B[Parse flags in while loop]
B --> C{Recognized flag?}
C -->|--installing| D[INSTALLING=true, shift]
C -->|--failsafe| E[FAILSAFE=true, shift]
C -->|--| F[shift, break]
C -->|other / unknown| G[break, keep $1]
D --> B
E --> B
F --> H
G --> H
H{INSTALLING != true AND $# > 0 AND $1 not --prefixed?}
H -->|YES| I[exec $@ - NEW: hands off to caller's command]
H -->|NO| J[Continue init script]
I --> Z[Process replaced - script exits]
J --> K[Install missing packages]
K --> L{INSTALLING = true?}
L -->|YES| M[Configure timezone, setup .bashrc, exit 0]
L -->|NO| N[Setup motd, acode CLI, initrc]
N --> O{FAILSAFE != true?}
O -->|YES| P[Launch bash terminal via axs]
O -->|NO| Q[Exit without launching terminal]
Reviews (2): Last reviewed commit: "Update init-alpine.sh" | Re-trigger Greptile |
No description provided.