Skip to content

flock-php install: report a declined permission prompt with an exit status, not text the apps match #25

Description

@Nejcc

What's wrong

The desktop apps tell a dismissed password or permission prompt apart from a real failure by matching the English error text that flock-php install prints:

cmd/flock/main.go exits with status 1 for every error, so the text is the only signal. If the message is reworded or translated, all three setup wizards quietly treat a declined prompt as a failure.

How it was found

@sineld raised this in the review of #19, on setup.html. I didn't change it there, because the same check is in the macOS and Windows apps too.

Suggested fix

  • Give flock-php install a dedicated exit status when the prompt is declined, for example through an error type carrying an exit code that cmd/flock/main.go passes to os.Exit.
  • Switch the three apps to check that status instead of the text.
  • Keep the message as it is, for people reading the terminal.

Activity

  1. added
    help wanted
    on Nov 3, 2026
  2. lukas-frey commented on Nov 5, 2026

    @lukas-frey
    Member

    Thanks a lot. This issue can be worked on if anyone wants to tackle it 👍

  3. mendez-11 commented on Nov 7, 2026

    @mendez-11

    I’d like to work on this. Plan: a dedicated exit status (4, since 3 is already used by worktree setup and the daemon) for a declined prompt in flock install/uninstall, the three apps checking it instead of the text, and the message unchanged. OK?

  4. lukas-frey commented on Nov 7, 2026

    @lukas-frey
    Member

    Sure, go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions