Skip to content

0 Exit code even if commands return non-zero exit codeย #2440

@xelandernt

Description

@xelandernt

Description

Issue

There is a different behaviour when installing with npm or brew:
If you install with npm:

npm install -g @go-task/cli
task test; echo $?

You will see the following:

task: [test] exit 255
task: Failed to run task "test": exit status 255                                                                                                                                                       
0

If you install with for example brew:

brew install go-task
task test; echo$?

task: [test] exit 255
task: Failed to run task "test": exit status 255                                                                                                                                                       
201   

Expected behaviour

Should always return a non-zero exit code.

Version

3.45.4

Operating system

Tested on Mac & Ubuntu

Experiments Enabled

No response

Example Taskfile

version: '3'

tasks:
  test:
    cmds:
      - exit 255

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions