Skip to content

setup-powerpoint action might fail with generic '/bin/bash' exit code 1 #11

@jozefizso

Description

@jozefizso

The GitHub Action NetOfficeFw/setup-powerpoint@27d9999fbb8827063ed9536a6416cc56e3b73232 fails during the step Dismiss Microsoft PowerPoint First Run Dialogs with:

Error: The process '/bin/bash' failed with exit code 1

This error is misleading at the workflow level. The installer and modal-dismiss logic both succeed; the failure is caused by a race condition while quitting PowerPoint under set -e.

Observed Behavior

  1. PowerPoint package downloads and installs successfully.
  2. Version is read successfully (16.103.4, build 25120717).
  3. Policy scripts run.
  4. Accessibility permission is granted.
  5. PowerPoint launches.
  6. All three first-run privacy screens are successfully dismissed:
    • ✓ Successfully completed first screen (pressed Return)
    • ✓ Successfully completed second screen (clicked radio + double Return)
    • ✓ Successfully completed third screen (pressed Return)
  7. Script prints Closing Microsoft PowerPoint...
  8. Step immediately ends with The process '/bin/bash' failed with exit code 1.

Root Cause

The failure originates in scripts/dismiss_privacy_modal.sh.

Relevant code flow:

  • set -e is enabled at scripts/dismiss_privacy_modal.sh:7.
  • After third-screen success, the script runs:
    • close_microsoft_powerpoint_app
    • exit 0
      (scripts/dismiss_privacy_modal.sh:143 and scripts/dismiss_privacy_modal.sh:144)
  • close_microsoft_powerpoint_app executes osascript to quit PowerPoint (scripts/dismiss_privacy_modal.sh:14).

Because set -e is active, any non-zero exit status from that osascript command aborts the script before exit 0 is reached.

This creates a race-condition failure mode:

  • The modal automation already succeeded.
  • PowerPoint may already be closing/not in an AppleScript-accepting state.
  • osascript can return non-zero.
  • set -e converts this into hard step failure.

Why this is a bug

  • The step intent is to dismiss first-run dialogs and continue test setup.
  • Core objective succeeds (all dialogs dismissed), but cleanup/quit is treated as fatal.
  • This creates false-negative workflow failures with a generic and hard-to-diagnose wrapper message.

Impact

  • Misleading diagnostics (/bin/bash exit 1) hide the actual issue.

Proposed Fix

Make PowerPoint shutdown best-effort and non-fatal.

Suggested approaches:

  1. Guard osascript in close_microsoft_powerpoint_app:
    • osascript ... || true
  2. Or temporarily disable set -e around the quit command.
  3. Emit an explicit warning if quit fails, but do not fail the step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions