mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
make shell use exec instead of invoke
This commit is contained in:
parent
e5ea239276
commit
cd1fe6505a
@ -344,9 +344,8 @@ int _main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
if ( !script.empty() ) {
|
||||
script = "function() { " + script + " }";
|
||||
mongo::shellUtils::MongoProgramScope s;
|
||||
if ( scope->invoke( script.c_str(), mongo::BSONObj() ) )
|
||||
if ( ! scope->exec( script , "(shell eval)" , true , true , false ) )
|
||||
return -4;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user