diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-03-05 01:22:21 (GMT) |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-03-05 01:22:26 (GMT) |
commit | e92bbcb1b1ced7f72aa8dfa7de5e274344f77b6c (patch) | |
tree | c3fb1a4dff95f4017d9f096f615e4b272e414f83 /src/ninja.cc | |
parent | 2338d9340bb2c13746805b4b878c889008850962 (diff) | |
download | Ninja-e92bbcb1b1ced7f72aa8dfa7de5e274344f77b6c.zip Ninja-e92bbcb1b1ced7f72aa8dfa7de5e274344f77b6c.tar.gz Ninja-e92bbcb1b1ced7f72aa8dfa7de5e274344f77b6c.tar.bz2 |
Give a useful hint if the user runs "ninja clean" and there is no "clean" target
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 0b3ffe5..ecf8421 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -195,9 +195,13 @@ bool CollectTargetsFromArgs(State* state, int argc, char* argv[], } else { *err = "unknown target '" + path + "'"; - Node* suggestion = state->SpellcheckNode(path); - if (suggestion) { - *err += ", did you mean '" + suggestion->path() + "'?"; + if (path == "clean") { + *err += ", did you mean 'ninja -t clean'?"; + } else { + Node* suggestion = state->SpellcheckNode(path); + if (suggestion) { + *err += ", did you mean '" + suggestion->path() + "'?"; + } } return false; } |