Skip to content

Commit

Permalink
Merge pull request #2350 from taminob/bugfix/2342/remove-no-work-to-d…
Browse files Browse the repository at this point in the history
…o-output-with-quiet

Do not print 'no work to do' with --quiet
  • Loading branch information
jhasse authored Nov 1, 2023
2 parents b60a7dd + 1111da8 commit 2a2e470
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions misc/output_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def test_pr_1685(self):
def test_status(self):
self.assertEqual(run(''), 'ninja: no work to do.\n')
self.assertEqual(run('', pipe=True), 'ninja: no work to do.\n')
self.assertEqual(run('', flags='--quiet'), '')

def test_ninja_status_default(self):
'Do we show the default status by default?'
Expand Down
4 changes: 3 additions & 1 deletion src/ninja.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,9 @@ int NinjaMain::RunBuild(int argc, char** argv, Status* status) {
disk_interface_.AllowStatCache(false);

if (builder.AlreadyUpToDate()) {
status->Info("no work to do.");
if (config_.verbosity != BuildConfig::NO_STATUS_UPDATE) {
status->Info("no work to do.");
}
return 0;
}

Expand Down

0 comments on commit 2a2e470

Please sign in to comment.