mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Terminating console if error happens in initialization.
--HG-- branch : dev
This commit is contained in:
@@ -36,6 +36,10 @@ namespace Orchard {
|
|||||||
DisplayUsageHelp();
|
DisplayUsageHelp();
|
||||||
return CommandReturnCodes.Ok;
|
return CommandReturnCodes.Ok;
|
||||||
}
|
}
|
||||||
|
if(context.StartSessionResult == CommandReturnCodes.Fail) {
|
||||||
|
_commandHostContextProvider.Shutdown(context);
|
||||||
|
return context.StartSessionResult;
|
||||||
|
}
|
||||||
|
|
||||||
CommandReturnCodes result;
|
CommandReturnCodes result;
|
||||||
if (context.Arguments.Arguments.Any())
|
if (context.Arguments.Arguments.Any())
|
||||||
@@ -56,6 +60,10 @@ namespace Orchard {
|
|||||||
if (result.StartSessionResult == result.RetryResult) {
|
if (result.StartSessionResult == result.RetryResult) {
|
||||||
result = _commandHostContextProvider.CreateContext();
|
result = _commandHostContextProvider.CreateContext();
|
||||||
}
|
}
|
||||||
|
else if(result.StartSessionResult == CommandReturnCodes.Fail) {
|
||||||
|
_output.WriteLine("Failed to initialize Orchard session.");
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user