File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ _parse_config() {
150150 fi
151151
152152 local configPath
153- if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " ; then
153+ if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " && [ -s " $configPath " ] ; then
154154 # if --config is specified, parse it into a JSON file so we can remove a few problematic keys (especially SSL-related keys)
155155 # see https://docs.mongodb.com/manual/reference/configuration-options/
156156 if grep -vEm1 ' ^[[:space:]]*(#|$)' " $configPath " | grep -qE ' ^[[:space:]]*[^=:]+[[:space:]]*=' ; then
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ _parse_config() {
150150 fi
151151
152152 local configPath
153- if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " ; then
153+ if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " && [ -s " $configPath " ] ; then
154154 # if --config is specified, parse it into a JSON file so we can remove a few problematic keys (especially SSL-related keys)
155155 # see https://docs.mongodb.com/manual/reference/configuration-options/
156156 if grep -vEm1 ' ^[[:space:]]*(#|$)' " $configPath " | grep -qE ' ^[[:space:]]*[^=:]+[[:space:]]*=' ; then
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ _parse_config() {
150150 fi
151151
152152 local configPath
153- if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " ; then
153+ if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " && [ -s " $configPath " ] ; then
154154 # if --config is specified, parse it into a JSON file so we can remove a few problematic keys (especially SSL-related keys)
155155 # see https://docs.mongodb.com/manual/reference/configuration-options/
156156 if grep -vEm1 ' ^[[:space:]]*(#|$)' " $configPath " | grep -qE ' ^[[:space:]]*[^=:]+[[:space:]]*=' ; then
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ _parse_config() {
150150 fi
151151
152152 local configPath
153- if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " ; then
153+ if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " && [ -s " $configPath " ] ; then
154154 # if --config is specified, parse it into a JSON file so we can remove a few problematic keys (especially SSL-related keys)
155155 # see https://docs.mongodb.com/manual/reference/configuration-options/
156156 if grep -vEm1 ' ^[[:space:]]*(#|$)' " $configPath " | grep -qE ' ^[[:space:]]*[^=:]+[[:space:]]*=' ; then
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ _parse_config() {
150150 fi
151151
152152 local configPath
153- if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " ; then
153+ if configPath=" $( _mongod_hack_get_arg_val --config " $@ " ) " && [ -s " $configPath " ] ; then
154154 # if --config is specified, parse it into a JSON file so we can remove a few problematic keys (especially SSL-related keys)
155155 # see https://docs.mongodb.com/manual/reference/configuration-options/
156156 if grep -vEm1 ' ^[[:space:]]*(#|$)' " $configPath " | grep -qE ' ^[[:space:]]*[^=:]+[[:space:]]*=' ; then
You can’t perform that action at this time.
0 commit comments