mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 18:05:58 +02:00
refactor: Stop using gArgs global in system.cpp
Most of the code in util/system.cpp that was hardcoded to use the global ArgsManager instance `gArgs` has been changed to work with explicit ArgsManager instances (for example in https://github.com/bitcoin/bitcoin/pull/20092). But a few hardcoded references to `gArgs` remain. This commit removes the last ones so these functions aren't reading or writing global state.
This commit is contained in:
@@ -84,7 +84,7 @@ static std::optional<int> WalletAppInit(ArgsManager& args, int argc, char* argv[
|
||||
// check for printtoconsole, allow -debug
|
||||
LogInstance().m_print_to_console = args.GetBoolArg("-printtoconsole", args.GetBoolArg("-debug", false));
|
||||
|
||||
if (!CheckDataDirOption()) {
|
||||
if (!CheckDataDirOption(args)) {
|
||||
tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", args.GetArg("-datadir", ""));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user