From 0f0361efb8551d1f97c621a66acbf9ff0368eb09 Mon Sep 17 00:00:00 2001 From: Edward d'Auvergne Date: Thu, 7 Nov 2019 12:11:21 +0100 Subject: [PATCH] Options::setupRoot: Removal of the logic that fg_root is currently not set. This allows the test suite to preset fg_root using its own bootstrapping logic. --- src/Main/options.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 4c536e576..20674f2b9 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -2933,9 +2933,14 @@ string_list Options::extractOptions() const void Options::setupRoot(int argc, char **argv) { - SGPath root; + SGPath root(globals->get_fg_root()); bool usingDefaultRoot = false; + // root has already been set, so skip the fg_root setting and validation. + if (!root.isNull()) { + return; + } + if (isOptionSet("fg-root")) { root = SGPath::fromLocal8Bit(valueForOption("fg-root").c_str()); // easy! SG_LOG(SG_GENERAL, SG_INFO, "set from command-line argument: fg_root = " << root );