Skip to content

Support overriding Ninja executable via NETSUKE_NINJA #83

@coderabbitai

Description

@coderabbitai

Summary
Enable overriding the Ninja executable via an environment variable to improve portability on systems where the binary is not named “ninja” or is installed at a non-default path.

Motivation
Some distributions and environments expose the Ninja binary under different names (e.g., “ninja-build”) or require invoking a fully qualified path. Allowing an environment variable to choose the program improves portability of the CLI without altering defaults.

Proposed behaviour

  • When the NETSUKE_NINJA environment variable is set, its value determines which Ninja executable is invoked.
  • When the variable is not set, the current default behaviour is preserved (use “ninja”).
  • Log the resolved program in the existing “Running command:” line for traceability.

Acceptance criteria

  • Behaviour is unchanged when NETSUKE_NINJA is unset.
  • When NETSUKE_NINJA points to a valid executable (by name or absolute path), the CLI invokes it for builds.
  • Document the environment variable in the CLI/runner documentation (docs/) and module docs.
  • Tests cover both cases (unset vs set), including that the resolved program is reflected in the logged command line.
  • No lints are silenced beyond narrowly scoped #[expect(...)] with reasons, per repository guidelines.

Backlinks

Requester
@leynos

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationmediumCould be disruptive, but might not happen

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions