It’s also worth pointing out that this behavior (running all logic outside of bash) is not unique to Nix ecosystem. Both Ansible and Chef utilize higher-level languages (Python and Ruby respectively) to directly call external binaries and parse their output in majority of their modules. Jetpack (Ansible reimagining in Rust) used Rust to template out commands to run over ssh (in order to avoid running an interpreter server side). Same thing in CI/CD systems, complex logic gets offloaded to another language and sh is treated as a dumb executor.
1 Like