print help msg for shell at a more reasonable time during startup

This commit is contained in:
dwight
2010-06-17 13:10:16 -04:00
parent 8d69487c78
commit 0d3bf995dc

View File

@@ -538,6 +538,9 @@ int _main(int argc, char* argv[]) {
mongo::globalScriptEngine->setScopeInitCallback( mongo::shellUtils::initScope );
auto_ptr< mongo::Scope > scope( mongo::globalScriptEngine->newScope() );
shellMainScope = scope.get();
if( runShell )
cout << "type \"help\" for help" << endl;
if ( !script.empty() ) {
mongo::shellUtils::MongoProgramScope s;
@@ -567,8 +570,6 @@ int _main(int argc, char* argv[]) {
shellHistoryInit();
cout << "type \"help\" for help" << endl;
//v8::Handle<v8::Object> shellHelper = baseContext_->Global()->Get( v8::String::New( "shellHelper" ) )->ToObject();
while ( 1 ){