-
-
Notifications
You must be signed in to change notification settings - Fork 793
Closed
Description
Description
I tried to add dependency on a tool for developers, however its failing if i use precondition.
Case o failure
tasks:
tests:
desc: run tests
cmds:
- task: install:tparse
ignore_error: true
- go test -v -json ./... | go tool tparse --all
install:tparse:
preconditions: [ "go tool | grep -q tparse && exit 1 || exit 0" ]
cmd: go get -tool github.com/mfridman/tparse@latest
ignore_error: true # this also do nothing
silent: true #aswell as silent ignoredResults in
> task backend:tests
task: `go tool | grep -q tparse && exit 1 || exit 0` failed
task: Failed to run task "backend:tests": task: Failed to run task "backend:install:tparse": task: precondition not met
Case o success
while
tasks:
tests2:
cmds:
- task: fail
ignore_error: true
- echo "works?"
fail:
cmd: sh 1
silent: trueResults in
> task backend:tests2
sh: 1: No such file or directory
task: [backend:tests2] echo "works?"
works?
So, why does having precondition for running of the tasks failng whole pipeline?
Version
3.48.0
Operating system
macOS
Experiments Enabled
No response
Example Taskfile
version: 3
tasks:
tests:
desc: run tests
cmds:
- task: install:tparse
ignore_error: true
- go test -v -json ./... | go tool tparse --all
install:tparse:
preconditions: [ "go tool | grep -q tparse && exit 1 || exit 0" ]
cmd: go get -tool github.com/mfridman/tparse@latest
ignore_error: true # this also do nothing
silent: true #aswell as silent ignoredReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels