[fixes #1083] ensure the CLI exist with the correct status

Is the 4-space indent intentional?