Skip to content

bug: --list-triggers exits with error code 1 instead of 0 #116

@RockyOmvi

Description

@RockyOmvi

Describe the bug

In src/buskill_cli.py, the --list-triggers flag exits with code 1 (indicating failure), but the operation is a successful informational display.

Code reference

src/buskill_cli.py:149:

if args.list_triggers:
    print( "Supported triggers include:" )
    for trigger in bk.SUPPORTED_TRIGGERS:
        print( "\t" +str(trigger))
    sys.exit(1)  # <-- BUG: should be sys.exit(0)

Steps to reproduce

buskill --list-triggers
echo $?  # prints 1, but should print 0

Expected behavior

sys.exit(0) for successful operations. Exit code 1 signals an error to scripts and shell pipelines.

Severity

Low — incorrect behavior that breaks script-based usage of the CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions