Hi all
I'm looking on how I can make my Dagger function fails if I find some files having the git conflict marker.
The code below is working fine but I should negate the exit code. The find command will return
- a non-zero exit code when nothing is retrieved (and this is what I want) --> if exit code 1 ==> success
- a zero-exit code when at least one file is retrieved --> if exit code 0 ==> my function has to fail
command: str = r"find . -type f -exec grep -l <<<<<<< {} +"
return str(await self.container.with_exec(command.split()).stdout())
What's the best approach to do this?
Thanks!