diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c50453b..4ce0e0fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ * `NextflowVDSL3Platform`: Fix 'Module scriptPath has not been defined yet' error when Nextflow>=22.10 (#269). +* `config inject`: Doesn't work when `must_exist == true` (#273). + ## DEPRECATION * `DockerRequirements`: The `resources:` setting has been deprecated and will be removed in Viash 0.7.0. Please use `copy:` instead. diff --git a/src/main/scala/io/viash/platforms/DebugPlatform.scala b/src/main/scala/io/viash/platforms/DebugPlatform.scala index 530fd0da0..3028abd22 100644 --- a/src/main/scala/io/viash/platforms/DebugPlatform.scala +++ b/src/main/scala/io/viash/platforms/DebugPlatform.scala @@ -63,6 +63,12 @@ case class DebugPlatform( arg.copy(required = false, default = One("value"), choices = Nil) case a => a } + // also turn off must_exist if it is set to true + .map{ + case arg: FileArgument if arg.must_exist => + arg.copy(must_exist = false) + case a => a + } .map{Right(_)} ) }