Page MenuHomePhabricator

Make cli-shell-api correctly exit with non-zero code on failures
Open, Requires assessmentPublic

Description

Right now, cli-shell-api always succeeds even when an operation has obviously failed. It does know about failures and prints appropriate messages, but never sets the exit code.
For example, cli-shell-api showConfig not failing for invalid or empty paths makes us explicitly check is a path exists.

In other words... Currnet behaviour:

$ cli-shell-api showConfig foo || echo Fail
Specified configuration path is not valid

Desired behaviour:

$ cli-shell-api showConfig foo || echo Fail
Specified configuration path is not valid
Fail

We likely want to add unique exit codes for different conditions.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

pasik added a subscriber: pasik.Wed, Feb 12, 10:33 AM