pub fn resolve_exec_command(
profile: Option<&str>,
inline: &[String],
cfg: &ExecConfig,
) -> Result<Vec<String>>Expand description
Resolve the argv gwm exec should run, from exactly one source: an
inline -- <cmd> or a --profile <name> (issue #324).
The two are mutually exclusive and exactly one is required:
- both given → error (the profile carries the command);
- a
--profilenaming an entry absent from[exec.profiles]→ error; - a profile whose
commandis empty → error (degenerate config); - neither given → error (nothing to run).
Every error path is a user-facing GwmError (exit 1), never a panic.