-
-
Notifications
You must be signed in to change notification settings - Fork 763
Open
Labels
dep: mvdan/shIssues related to the upstream interpreter used by Task.Issues related to the upstream interpreter used by Task.
Description
Description
A Taskfile that worked fine for months is now failing when trying to evaluate an environment variable within a precondition.
This Taskfile works:
version: "3"
env:
PORT: 1313
tasks:
port:
cmds:
- echo $PORTOutput:
> task port
task: [port] echo $PORT
1313
This one fails:
version: "3"
env:
PORT: 1313
tasks:
noserverrunning:
preconditions:
- sh: "! nc -z localhost $PORT"
msg: Port $PORT is not available.
port:
deps:
- noserverrunning
cmds:
- echo $PORTOutput:
> task port
task: Port $PORT is not available.
task: precondition not met
Expected (if the precondition isn't met): Port 1313 is not available.
The Taskfile has been the same for months, but when I used it today, it started failing. Hence I assume it's a bug.
Version
3.44.1
Operating system
macOS Sequoia 15.5
Experiments Enabled
No response
Example Taskfile
version: "3"
env:
PORT: 1313
tasks:
noserverrunning:
preconditions:
- sh: "! nc -z localhost $PORT"
msg: Port $PORT is not available.
port:
deps:
- noserverrunning
cmds:
- echo $PORTMetadata
Metadata
Assignees
Labels
dep: mvdan/shIssues related to the upstream interpreter used by Task.Issues related to the upstream interpreter used by Task.