Another PR, this time fixing the globbing issue: <...
# nf-schema
n
Another PR, this time fixing the globbing issue: https://github.com/nextflow-io/nf-schema/pull/182
šŸ‘€ 1
a
Do you have an explanation of why this was working before but not now? I can't - in theory - see a reason not to support checking that the files found by a glob exist. Of course how they would be found by the glob but not exist is another question
n
Technically it was not supported already, but somehow the .exists() worked on a List of Paths. I think this weirdness was fixed now causing this to break. I moved the check up. I could check existence of every file but that would be double work IMO because they wouldn't be found otherwise
Although you got a point. I might just say that the files exist if more than 2 are found instead of just passing the check
a
Yeah I think the meaning of "exists" for a glob probably needs some level of definition. I suspect in many cases it is either if at least 1 file exists, and in most others if at least 2 files exist. So we could perhaps checks that it finds 1/2 files?
n
Yes what I was thinking is the following: • 0 files found: always say
exists = false
• 1 file found: always check the existence of this 1 file • 2 or more files found: always say
exists = true
a
I could live with that
n
Nice, I'll update the PR
a
šŸ‘
n
Done šŸ˜›
a
Will review Monday if that's ok.
n
That's okay, I might have merged it by then though as I want to release ASAP šŸ˜› but take your time, patch releases are still possible later