diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/other_tools/just_mr/cli.hpp | 2 | ||||
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 4 | ||||
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 2 | ||||
-rw-r--r-- | src/other_tools/just_mr/main.cpp | 8 | ||||
-rw-r--r-- | src/other_tools/just_mr/setup.cpp | 4 |
5 files changed, 9 insertions, 11 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp index cf4b0346..c4773952 100644 --- a/src/other_tools/just_mr/cli.hpp +++ b/src/other_tools/just_mr/cli.hpp @@ -55,7 +55,7 @@ struct MultiRepoCommonArguments { std::size_t jobs{std::max(1U, std::thread::hardware_concurrency())}; std::vector<std::string> defines{}; std::optional<std::string> remote_execution_address; - std::optional<bool> compatible{std::nullopt}; + bool compatible{false}; std::optional<std::string> remote_serve_address; bool fetch_absent{false}; }; diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 0f0a0ef1..0aab2549 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -398,7 +398,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, common_args.remote_serve_address, auth_args); IExecutionApi::Ptr local_api{std::make_unique<LocalApi>()}; - bool remote_compatible{common_args.compatible == true}; + bool remote_compatible{common_args.compatible}; // setup the API for serving roots auto serve_config = JustMR::Utils::CreateServeConfig( @@ -425,7 +425,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, "serve endpoint failed. Serve endpoint ignored."); serve = std::nullopt; } - if (*compatible != remote_compatible) { + if (*compatible != common_args.compatible) { Logger::Log( LogLevel::Warning, "Provided serve endpoint operates in a different compatibility " diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index 693d8808..132ed065 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -167,7 +167,7 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file, } // forward remote execution and mutual TLS arguments if (supports_remote) { - if (common_args.compatible == true) { + if (common_args.compatible) { cmd.emplace_back("--compatible"); } if (common_args.remote_execution_address) { diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp index 31f63d3d..23a81f59 100644 --- a/src/other_tools/just_mr/main.cpp +++ b/src/other_tools/just_mr/main.cpp @@ -330,8 +330,7 @@ auto main(int argc, char* argv[]) -> int { if (arguments.cmd == SubCommand::kJustDo or arguments.cmd == SubCommand::kJustSubCmd) { // check setup configuration arguments for validity - if (arguments.common.compatible == true and - arguments.common.fetch_absent) { + if (arguments.common.compatible and arguments.common.fetch_absent) { Logger::Log(LogLevel::Error, "Fetching absent repositories only available in " "native mode!"); @@ -361,8 +360,7 @@ auto main(int argc, char* argv[]) -> int { if (arguments.cmd == SubCommand::kSetup or arguments.cmd == SubCommand::kSetupEnv) { // check setup configuration arguments for validity - if (arguments.common.compatible == true and - arguments.common.fetch_absent) { + if (arguments.common.compatible and arguments.common.fetch_absent) { Logger::Log(LogLevel::Error, "Fetching absent repositories only available in " "native mode!"); @@ -396,7 +394,7 @@ auto main(int argc, char* argv[]) -> int { // Run subcommand `fetch` if (arguments.cmd == SubCommand::kFetch) { // check fetch configuration arguments for validity - if (arguments.common.compatible == true) { + if (arguments.common.compatible) { if (arguments.common.remote_execution_address and arguments.fetch.backup_to_remote) { Logger::Log( diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp index b0f81a08..9e271467 100644 --- a/src/other_tools/just_mr/setup.cpp +++ b/src/other_tools/just_mr/setup.cpp @@ -116,7 +116,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, common_args.remote_serve_address, auth_args); IExecutionApi::Ptr local_api{std::make_unique<LocalApi>()}; - bool remote_compatible{common_args.compatible == true}; + bool remote_compatible{common_args.compatible}; // setup the API for serving roots auto serve_config = JustMR::Utils::CreateServeConfig( @@ -144,7 +144,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config, "serve endpoint failed."); serve = std::nullopt; } - if (*compatible != remote_compatible) { + if (*compatible != common_args.compatible) { Logger::Log( LogLevel::Warning, "Provided serve endpoint operates in a different compatibility " |