Skip to content

macOS: pass command-line arguments through run_phd2_macos - #1471

Merged
agalasso merged 1 commit into
OpenPHDGuiding:masterfrom
MichaelJEvan:macos-launcher-args
Oct 20, 2026
Merged

agalasso merged 1 commit into
OpenPHDGuiding:masterfrom
MichaelJEvan:macos-launcher-args

Conversation

@MichaelJEvan

Copy link
Copy Markdown
Contributor

run_phd2_macos (the bundle's CFBundleExecutable) ends with exec "$HERE"/PHD2 without "$@", so arguments given through LaunchServices never reach PHD2. open -n -a PHD2.app --args -i 2 starts instance 1 instead of instance 2.

This passes them on.

Tested on macOS 26.6.2, Apple M5 Max, built on top of #1453:

  1. Before: open -n -a PHD2.app --args -i 9 started PHD2 with no arguments (event server on 4400).
  2. After: the process gets -i 9 and listens on 4408.

open -a PHD2.app --args -i 2 started instance 1: the bundle launcher
dropped its arguments.

@agalasso agalasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for the pr!

@agalasso
agalasso merged commit 97451ea into OpenPHDGuiding:master Oct 20, 2026
1 check passed
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.

2 participants