Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { | ||||
tfm::format(std::cout, "%s", strUsage.c_str()); | tfm::format(std::cout, "%s", strUsage.c_str()); | ||||
if (argc < 2) { | if (argc < 2) { | ||||
tfm::format(std::cerr, "Error: too few parameters\n"); | tfm::format(std::cerr, "Error: too few parameters\n"); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
return EXIT_SUCCESS; | return EXIT_SUCCESS; | ||||
} | } | ||||
if (!fs::is_directory(GetDataDir(false))) { | if (!CheckDataDirOption()) { | ||||
tfm::format(std::cerr, | tfm::format(std::cerr, | ||||
"Error: Specified data directory \"%s\" does not exist.\n", | "Error: Specified data directory \"%s\" does not exist.\n", | ||||
gArgs.GetArg("-datadir", "").c_str()); | gArgs.GetArg("-datadir", "").c_str()); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
if (!gArgs.ReadConfigFiles(error, true)) { | if (!gArgs.ReadConfigFiles(error, true)) { | ||||
tfm::format(std::cerr, "Error reading configuration file: %s\n", | tfm::format(std::cerr, "Error reading configuration file: %s\n", | ||||
error.c_str()); | error.c_str()); | ||||
▲ Show 20 Lines • Show All 465 Lines • Show Last 20 Lines |