Skip to content

Return non-zero exit codes on errors in netsparkle-generate-appcast (fixes #740) - #743

Merged
Deadpikle merged 2 commits into
NetSparkleUpdater:developfrom
SENESO:fix/appcast-exit-codes
Oct 11, 2026
Merged

Deadpikle merged 2 commits into
NetSparkleUpdater:developfrom
SENESO:fix/appcast-exit-codes

Conversation

@SENESO

@SENESO SENESO commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The app-cast generator always exited 0, even on errors, which breaks CI usage. Main/Run now return int: all error paths (missing keys, failed generation, null signature, invalid signature, null app-cast items, parse errors) return 1, successes return 0. --help/--version still exit 0. Also fixed export-keys continuing after a null key load.

@Deadpikle

Copy link
Copy Markdown
Member

Hi @SENESO,

I appreciate the contribution. However, at this time, I'm not going to merge it (yet). @bdovaz in #740 has already outlined a PR path for #740 and asked to start on it.

Plus, this PR does not do what I asked for in #740 with using an enum for return codes and errors for easier code reading.

Replaces magic 0/1 exit codes with a descriptive ExitCode enum so each
failure has its own value (e.g. ErrorNoOutputDirectory), making the
code easier to read and letting CI scripts tell errors apart.
@SENESO
SENESO force-pushed the fix/appcast-exit-codes branch from 7a59c30 to 08f98f0 Compare October 8, 2026 11:42
@SENESO

SENESO commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback — I've updated the PR to use an ExitCode enum with descriptive values for each failure, as suggested in #740.

@bdovaz

bdovaz commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

It's okay, I haven't started yet.

I'm glad about this PR—one less for me 😜

@SENESO

SENESO commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Happy to take it off your plate! Let me know if you'd like any tweaks to the approach 😄

netsparkle-generate-appcast -b binary/folder -p change/log/folder

# Customize download URL for binaries and change logs
netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads -p https://example.com/downloads/changelogs

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.

What's the reason for this change?

@Deadpikle Deadpikle Oct 11, 2026 •

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.

OH I'm goofy. Ok, this is a typo. The -p flag is correct, but the last -p to the URL should be -l for the change-log-url flag.

So it should read:

netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads -l https://example.com/downloads/changelogs

Could you update it to that rather than removing the -p change/log/folder part, please? My bad on not understanding what you did, here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — the example now reads netsparkle-generate-appcast -b binary/folder -p change/log/folder -u https://example.com/downloads -l https://example.com/downloads/changelogs, exactly as you specified.

Explanation of the original change: while reworking Main/Run to return the ExitCode enum, I touched that example line and accidentally dropped the -p change/log/folder segment — and left the changelog URL on -p (change-log-path) instead of -l (change-log-url). Restored the segment and corrected the flag. Thanks for catching it! 😄

@Deadpikle

Deadpikle commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Thank you both for being cordial about things. 😄

I'm not sure what the reason behind the doc example change is. If you can justify it, I'll merge, but otherwise please remove that one change and then I'll merge this. Thank you!

EDIT: I see the typo in the example change; see comments for what needs to be tweaked. Thanks! 😅

@Deadpikle
Deadpikle merged commit 0f5f111 into NetSparkleUpdater:develop Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants