From 73294ee4fecf2690489dcf4e827fd068b98fc3f2 Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Tue, 7 Apr 2020 16:21:03 +0200 Subject: [PATCH] Fix Broken Validator Version Flag I'm not sure if that is the way the version detection though IG should work. But that is my take on it. --- .../src/main/java/org/hl7/fhir/validation/cli/Params.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/Params.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/Params.java index 59f57212e..cbd08140f 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/Params.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/Params.java @@ -169,9 +169,11 @@ public class Params { throw new Error("Specified " + args[i] + " without indicating ig file"); else { String s = args[++i]; - cliContext.setSv(Common.getVersionFromIGName(null, s)); - if (cliContext.getSv() == null) { + String version = Common.getVersionFromIGName(null, s); + if (version == null) { cliContext.addIg(s); + } else { + cliContext.setSv(version); } } } else if (args[i].equals(MAP)) {