Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: First run/ fresh install does not add ghostty to PATH #2483

Open
archcorsair opened this issue Oct 23, 2024 · 2 comments
Open

macOS: First run/ fresh install does not add ghostty to PATH #2483

archcorsair opened this issue Oct 23, 2024 · 2 comments
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. shell-integration

Comments

@archcorsair
Copy link

archcorsair commented Oct 23, 2024

Summary

When launching Ghostty for the first time on macOS, the ghostty binary is not added to PATH
The documentation doesn't appear to outline additional steps for macOS.

Expected

The ghostty command should be available in the terminal on first launch

Actual

Running the ghostty command in terminal does not work until it is manually added to your profile, in my case:

export PATH=$PATH:$GHOSTTY_BIN_DIR

Ghostty Versions Tested

  • 0.1.0-main+5e001fcb
  • 0.1.0-main+61aff898
@mitchellh
Copy link
Contributor

As discussed in Discord, I think we should do this in the shell integration for now because I don't want to introduce a helper binary between login and the shell as noted in: zed-industries/zed#4827 (comment)

@mitchellh mitchellh added shell-integration contributor friendly A well-scoped, approachable issue for someone looking to contributor. labels Oct 24, 2024
@discentem
Copy link

One possible alternative to shell integration and a helper binary is to distribute a .pkg for Ghostty that has a postinstall script which creates a symlink instead of or in addition to the .dmg and .zip file. I was thinking to submit a PR for this but wasn't sure where the best integration point -- Makefile, Github Action, build.zig etc. Is there any interest in this solution? If so, please let me know where the best integration point is.

Here's a preliminary example in my fork: https://github.com/discentem/ghostty/blob/9abe973a9a53e9a470302a7877075d9941a14605/Makefile#L30-L36

  • This example uses https://github.com/munki/munki-pkg, with the build-info.yaml file as input
    • build-info.yaml also supports specifying a certificate for signing and notarization if desired, though not shown in my fork yet
  • Before munkipkg would be ran the Ghostty.app is copied to the right place to be embedded in the pkg. This would be the outputted by a previous build step (see my question about integration points).

One major downside to munkipkg is that it would introduce a Python dependency during build time. However, everything munkipkg is doing under the hood could just be converted to a shell script if that's undesired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. shell-integration
Projects
None yet
Development

No branches or pull requests

3 participants