diff options
author | Spencer T Brody <spencer@mongodb.com> | 2014-04-17 14:18:19 -0400 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2014-05-15 19:15:16 -0400 |
commit | adc534fcdd0425f689954f44a940f6416e46673a (patch) | |
tree | a39f849a2f663da32eac9a160a9bb3a71f10be40 | |
parent | 68ae4983b197cf853ae3367a95a03a4946141115 (diff) | |
download | mongo-adc534fcdd0425f689954f44a940f6416e46673a.tar.gz |
SERVER-13588 Fix regression in supression of startup warning when unauthorized
(cherry picked from commit 177d92b10d8447eb09cca8c6bd8eed0d9f04bc54)
-rw-r--r-- | src/mongo/shell/utils.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js index 218bbedf75e..9006582a819 100644 --- a/src/mongo/shell/utils.js +++ b/src/mongo/shell/utils.js @@ -711,7 +711,9 @@ shellHelper.show = function (what) { } else if (res.errmsg == "no such cmd: getLog" ) { // Don't print if the command is not available return ""; - } else if (res.errmsg == "unauthorized" || res.errmsg == "need to login") { + } else if (res.code == 13 /*unauthorized*/ || + res.errmsg == "unauthorized" || + res.errmsg == "need to login") { // Don't print if startupWarnings command failed due to auth return ""; } else { |