Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7484 from EOSIO/7346
Browse files Browse the repository at this point in the history
return zero exit status for nodeos version, help, fixed reversible, and extracted genesis
  • Loading branch information
heifner committed Jun 20, 2019
2 parents 168d5f7 + f860cbe commit 50e06cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/appbase
10 changes: 7 additions & 3 deletions programs/nodeos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ enum return_codes {
SUCCESS = 0,
BAD_ALLOC = 1,
DATABASE_DIRTY = 2,
FIXED_REVERSIBLE = 3,
EXTRACTED_GENESIS = 4,
FIXED_REVERSIBLE = SUCCESS,
EXTRACTED_GENESIS = SUCCESS,
NODE_MANAGEMENT_SUCCESS = 5
};

Expand All @@ -93,8 +93,12 @@ int main(int argc, char** argv)
.default_unix_socket_path = "",
.default_http_port = 8888
});
if(!app().initialize<chain_plugin, net_plugin, producer_plugin>(argc, argv))
if(!app().initialize<chain_plugin, net_plugin, producer_plugin>(argc, argv)) {
if(app().get_options().count("help") || app().get_options().count("version")) {
return SUCCESS;
}
return INITIALIZE_FAIL;
}
initialize_logging();
ilog("${name} version ${ver}", ("name", nodeos::config::node_executable_name)("ver", app().version_string()));
ilog("${name} using configuration file ${c}", ("name", nodeos::config::node_executable_name)("c", app().full_config_file_path().string()));
Expand Down

0 comments on commit 50e06cc

Please sign in to comment.