Skip to content

Commit 263fc4f

Browse files
committed
Avoid failing on auth for unconfigured replsets
All errors not related to authentication mean that auth is not required.
1 parent b140a18 commit 263fc4f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

templates/mongoshrc.js.erb

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ function authRequired() {
2424
if (err.message.match(/requires authentication/) || err.message.match(/not authorized on admin/)) {
2525
return true
2626
}
27-
if (err.message.match(/not running with --replSet/)) {
28-
return false
29-
}
30-
throw("Unknown error: " + err)
27+
return false
3128
}
3229
}
3330

0 commit comments

Comments
 (0)