Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ninja status format string from argv. #1180

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gkistanova
Copy link
Contributor

Ninja supports a status format string from NINJA_STATUS env. This is a great feature to have.
Though, in an automated build environment provisioning environmental variables could be tricky.

This patch adds a support for a command line option (--status-format=) to set the status format string. If given, the status format string from the command line would override the one from NINJA_STATUS env.

Only a long option is supported for now. Easy to add a short form if it will be a use case for that.

@nicolasdespres
Copy link
Contributor

If you want to set NINJA_STATUS just for a single process invocation, you can do env NINJA_STATUS='foo' ninja. Note that depending on your shell, you may even omit the call to the env program.

@gkistanova
Copy link
Contributor Author

Right. Though, it is not always launched from a shell. Addressing that use case was the original motivation of the patch.

@nico
Copy link
Collaborator

nico commented Nov 8, 2016

Thanks, that looks like a good feature.

(Note to self: Related to #746)

@jhasse
Copy link
Collaborator

jhasse commented Nov 13, 2018

Though, it is not always launched from a shell.

env doesn't require a shell though :)

@jonesmz

This comment was marked as abuse.

@gkistanova
Copy link
Contributor Author

@jonesmz The PR has been rebased on the latest master branch.

@jhasse jhasse added this to the 2.0.0 milestone Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants