Skip to content

Commit

Permalink
fix typo and remove unnecessary conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
AVMatthews committed Dec 5, 2024
1 parent 02159d9 commit 1a8e372
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
28 changes: 13 additions & 15 deletions components/core/src/clp_s/CommandLineArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,20 @@ CommandLineArguments::parse_arguments(int argc, char const** argv) {
throw std::invalid_argument("No input paths specified.");
}

if (parsed_command_line_options.count("file-type") > 0) {
if (cJsonFileType == file_type) {
m_file_type = FileType::Json;
} else if (cKeyValueIrFileType == file_type) {
m_file_type = FileType::KeyValueIr;
if (m_structurize_arrays) {
SPDLOG_ERROR(
"Invalid combination of arguments; --file-type {} and "
"--structurize-arrays can't be used together",
cKeyValueIrFileType
);
return ParsingResult::Failure;
}
} else {
throw std::invalid_argument("Unknown FILE_TYPE: " + file_type);
if (cJsonFileType == file_type) {
m_file_type = FileType::Json;
} else if (cKeyValueIrFileType == file_type) {
m_file_type = FileType::KeyValueIr;
if (m_structurize_arrays) {
SPDLOG_ERROR(
"Invalid combination of arguments; --file-type {} and "
"--structurize-arrays can't be used together",
cKeyValueIrFileType
);
return ParsingResult::Failure;
}
} else {
throw std::invalid_argument("Unknown FILE_TYPE: " + file_type);
}

// Parse and validate global metadata DB config
Expand Down
2 changes: 1 addition & 1 deletion components/core/src/clp_s/clp-s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool compress(CommandLineArguments const& command_line_arguments) {
// Functionality Coming in later PR
// -->Call new parsing function in Json Parser to parse IRv2 to archive
// -->Check for error from parsing function
SPDLOG_ERROR("Compressing Key Valur IR Files is not yet supported");
SPDLOG_ERROR("Compressing Key Value IR Files is not yet supported");
return false;
} else {
if (false == parser.parse()) {
Expand Down

0 comments on commit 1a8e372

Please sign in to comment.