Skip to content

Convert: Returns 1 if conversion failed; 2 if bad args#302

Merged
goneall merged 8 commits into
spdx:masterfrom
bact:exit-code-convert
Jul 19, 2026
Merged

Convert: Returns 1 if conversion failed; 2 if bad args#302
goneall merged 8 commits into
spdx:masterfrom
bact:exit-code-convert

Conversation

@bact

@bact bact commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Implement exit codes as proposed in #299

Remove unused ERROR_STATUS.

Note

This PR requires ExitCode, introduced in PR #300.
Should merge #300 before this one.

bact added 4 commits July 16, 2026 13:57
run() returns an exit-status int instead of calling System.exit()
directly. No behavior change.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
USAGE_ERROR_STATUS=2 for bad invocation (missing args, invalid file type, invalid file name);

ERROR_STATUS=1 stays for invalid or unreadable SPDX documents.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the enhancement New feature or request label Jul 16, 2026
@bact
bact marked this pull request as draft July 16, 2026 14:25
bact added 3 commits July 19, 2026 09:45
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact
bact marked this pull request as ready for review July 19, 2026 17:41
@bact
bact requested a review from goneall July 19, 2026 17:41
@goneall

goneall commented Jul 19, 2026

Copy link
Copy Markdown
Member

@bact - the files changed is showing the changes merged in PR #300 - I'm not sure why. The merged code does show up.

@bact

bact commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

@goneall thank you - it should show only one file now.

@goneall goneall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@goneall
goneall merged commit c5889ef into spdx:master Jul 19, 2026
1 check passed
@bact
bact deleted the exit-code-convert branch July 19, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants