onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
2 stars 1 forks source link

Fix folder duplication in file path #110

Closed Wambere closed 6 months ago

Wambere commented 6 months ago

In this run in the SID fhir-resources repo, one of the folder names is duplicated during validation causing a failure

EFSITY: :: INFO  :: Starting FHIR resource validation
EFSITY: :: INFO  :: Input file path app_configs/bunda/app/profiles/
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
EFSITY: :: INFO  :: /home/runner/work/sid-dto-fhir-resources/sid-dto-fhir-resources/app_configs/bunda/app/profiles/childpastencounters_profile_config.json
java.lang.NullPointerException
    at java.base/sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:75)
    at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
    at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
    at java.base/java.nio.file.Path.of(Path.java:147)
    at java.base/java.nio.file.Paths.get(Paths.java:69)
    at org.smartregister.command.ValidateFhirResourcesCommand.validateConfig(ValidateFhirResourcesCommand.java:154)
    at org.smartregister.command.ValidateFhirResourcesCommand.validateFhirResources(ValidateFhirResourcesCommand.java:102)
    at org.smartregister.command.ValidateFhirResourcesCommand.run(ValidateFhirResourcesCommand.java:49)
    at picocli.CommandLine.executeUserObject(CommandLine.java:[20](https://github.com/ona-health/sid-dto-fhir-resources/actions/runs/7557547682/job/20577034384#step:7:21)26)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
    at picocli.CommandLine.execute(CommandLine.java:[21](https://github.com/ona-health/sid-dto-fhir-resources/actions/runs/7557547682/job/20577034384#step:7:22)70)
    at org.smartregister.Main.main(Main.java:[29](https://github.com/ona-health/sid-dto-fhir-resources/actions/runs/7557547682/job/20577034384#step:7:30))
Error: Process completed with exit code 1.

.../sid-dto-fhir-resources/sid-dto-fhir-resources/... is the path that the validation is trying to use this needs to simply be .../sid-dto-fhir-resources/...