Skip to content

Refactor script logic, enhance error handling, and fix progress calcu…#2

Open
just-some-tall-bloke wants to merge 1 commit intoroto31:mainfrom
just-some-tall-bloke:main
Open

Refactor script logic, enhance error handling, and fix progress calcu…#2
just-some-tall-bloke wants to merge 1 commit intoroto31:mainfrom
just-some-tall-bloke:main

Conversation

@just-some-tall-bloke
Copy link

  • Fixed Bugs: Resolved infinite loops on cancellation, corrected progress bar math, and initialized missing variables.
  • Improved Reliability: Added checks for the dialog binary and implemented proper quoting for variables with spaces.
  • Cleanup: Removed duplicate variable definitions and deleted dead code/comments.

…lation

Fixed Bugs: Resolved infinite loops on cancellation, corrected progress bar math, and initialised missing variables.

Improved Reliability: Added checks for the dialog binary and implemented proper quoting for variables with spaces.

Cleanup: Removed duplicate variable definitions and deleted dead code/comments.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2928ee0ba5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +63 to +65
if [[ "$result" == *"button2"* ]] || [[ -z "$result" ]]; then
echo "User cancelled or no application selected"
exit 0

Choose a reason for hiding this comment

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

P2 Badge Return nonzero when dialog output is unexpectedly empty

Treating an empty result as a successful cancel (exit 0) hides real execution failures: when dialog cannot display (for example, non-interactive/GUI-unavailable runs or runtime invocation errors), stdout is also empty, so the script exits successfully even though no install happened. This causes calling automation to mark the run as success. Handle true cancel separately and return a nonzero status for empty output that comes from command failure.

Useful? React with 👍 / 👎.

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.

1 participant