0
0
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:
Eliot Horowitz 2009-08-28 13:26:23 -04:00
parent e5ea239276
commit cd1fe6505a

View File

@ -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;
}