Skip to content

Wrong error code sent when failure  #10295

@cderv

Description

@cderv

This is an error

> quarto rend
ERROR: Unknown command "rend". Did you mean command "render"?

But exit code is 0 not 1

> $LASTEXITCODE
0

This is a regression compared to previous version, and especially annoying when combine with --quiet

> quarto rend --quiet
> $LASTEXITCODE
0

There is now no way to check for error when --quiet is set.

This was found as it broke a test in quarto R 📦 which rely on the exit code to know if there is an error or not.

A quick git bisect points to 94c83b4 from

I do believe the exist code should still be 1 as these are error.

Same on bash with latest stable build and pre-release

❯ $(qvm path versions)"/v1.5.54/bin/quarto" rend
ERROR: Unknown command "rend". Did you mean command "render"?

❯ echo $?
0

Latest working version for this is 1.5.40

Metadata

Metadata

Assignees

No one assigned

    Labels

    backportbugSomething isn't workingregressionFunctionality that used to work but now is broken.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions