diff --git a/src/cli/MeasureUpdateCommand.cpp b/src/cli/MeasureUpdateCommand.cpp index 3096dfb0313..e58d361a22f 100644 --- a/src/cli/MeasureUpdateCommand.cpp +++ b/src/cli/MeasureUpdateCommand.cpp @@ -268,12 +268,13 @@ namespace cli { ->check(CLI::NonexistentPath); copyMeasureSubCommand->callback([opt] { - // boost::optional b_; - // try { - // b_ = BCLMeasure(opt->directoryPath); - // } catch (...) { - // throw std::runtime_error(fmt::format("Could not find a valid measure at '{}'\n", openstudio::toString(opt->directoryPath))); - // } + boost::optional b_; + try { + b_ = BCLMeasure(opt->directoryPath); + } catch (...) { + fmt::print(stderr, "Could not find a valid measure at '{}'\n", openstudio::toString(opt->directoryPath)); + std::exit(1); + } // auto bClone_ = b_->clone(opt->newMeasureOpts.directoryPath); auto b = BCLMeasure(opt->directoryPath); auto bClone_ = b.clone(opt->newMeasureOpts.directoryPath); @@ -288,7 +289,7 @@ namespace cli { openstudio::toString(openstudio::filesystem::canonical(bClone_->directory()))); std::exit(0); // NOLINT(concurrency-mt-unsafe) } else { - fmt::print("Something went wrong when cloning the measure"); + fmt::print(stderr, "Something went wrong when cloning the measure"); std::exit(1); // NOLINT(concurrency-mt-unsafe) } });