Skip to content

Commit 2a2e470

Browse files
authored
Merge pull request ninja-build#2350 from taminob/bugfix/2342/remove-no-work-to-do-output-with-quiet
Do not print 'no work to do' with --quiet
2 parents b60a7dd + 1111da8 commit 2a2e470

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

misc/output_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def test_pr_1685(self):
133133
def test_status(self):
134134
self.assertEqual(run(''), 'ninja: no work to do.\n')
135135
self.assertEqual(run('', pipe=True), 'ninja: no work to do.\n')
136+
self.assertEqual(run('', flags='--quiet'), '')
136137

137138
def test_ninja_status_default(self):
138139
'Do we show the default status by default?'

src/ninja.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,9 @@ int NinjaMain::RunBuild(int argc, char** argv, Status* status) {
13661366
disk_interface_.AllowStatCache(false);
13671367

13681368
if (builder.AlreadyUpToDate()) {
1369-
status->Info("no work to do.");
1369+
if (config_.verbosity != BuildConfig::NO_STATUS_UPDATE) {
1370+
status->Info("no work to do.");
1371+
}
13701372
return 0;
13711373
}
13721374

0 commit comments

Comments
 (0)