From 476a41ff65926d7891df4e6e434d06588709a85a Mon Sep 17 00:00:00 2001 From: ivan-aksamentov Date: Tue, 26 Oct 2021 08:50:54 +0200 Subject: [PATCH] fix(cli): make error message more informative when QC config is missing Resolves https://github.com/nextstrain/nextclade/issues/577 --- packages/nextclade_cli/src/io/getInputPaths.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nextclade_cli/src/io/getInputPaths.h b/packages/nextclade_cli/src/io/getInputPaths.h index ed3cd48e2..de0c8f5d3 100644 --- a/packages/nextclade_cli/src/io/getInputPaths.h +++ b/packages/nextclade_cli/src/io/getInputPaths.h @@ -89,6 +89,11 @@ namespace Nextclade { "Either `--input-dataset` or `--input-tree` is required. Cannot proceed without reference tree."); } + if (cliParams->inputDataset.empty() && inputQcConfig.empty()) { + throw ErrorFatal( + "Either `--input-dataset` or `--input-qc-config` is required. Cannot proceed without QC config."); + } + if (!cliParams->inputDataset.empty()) { auto inputDataset = std::string{cliParams->inputDataset};