Expand description
Direct-exec fast path for aube run.
Every package script normally goes through sh -c "<body>". /bin/sh
does not exec in place — dash stays resident as the script’s parent —
so a shell costs a whole extra process per invocation. For a body that
is one plain command (tsc -p ., vitest run, node build.js) the
shell contributes nothing but that process.
This module decides when a body can skip the shell. It is deliberately
a strict allowlist rather than a tokenizer: a tokenizer splits words
but says nothing about shell semantics, so it cannot tell us whether
the shell was load-bearing. Anything we do not recognize with
certainty falls back to sh -c, which is the pre-existing behavior.
Every bail is a correctness win traded for a process we keep paying.
Functions§
- direct_
argv - Plan a direct exec of
bodyagainstpath, orNoneto usesh. - resolve_
program - Find
programonpath, mirroring how the shell would resolve it.