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

Shell integration on MacOS (Ventura) Apple Silicone M1 #251

Closed
5 tasks done
matt-horwood-mayden opened this issue Dec 20, 2022 · 5 comments · Fixed by #252 or #263
Closed
5 tasks done

Shell integration on MacOS (Ventura) Apple Silicone M1 #251

matt-horwood-mayden opened this issue Dec 20, 2022 · 5 comments · Fixed by #252 or #263
Labels
bug Something isn't working

Comments

@matt-horwood-mayden
Copy link

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Does your issue already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

I have got the shell integration setup, but it doenst work, as in my mac cant find the symlink.

  • pulsar-beta -> /Applications/Pulsar.app/Contents/Resources/app/pulsar.sh

I have found the right shell script and fixed the symlink, I then get an error.

  • ln -s /Applications/Pulsar.app/Contents/Resources/pulsar.sh /usr/local/bin/pulsar
  • The application //Applications cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=4101, _LSFunction=_LSOpenStuffCallLocal}

If you need anything else please shout.


Pulsar: 1.100.0-beta
custom packages:

  • atom-jinja2
  • auto-dark-mode
  • language-ansible
  • language-github-actions
  • language-ini
  • language-nagios
  • language-nginx
  • language-terraform
  • language-yaml-cloudformation
  • octoclippy
  • project-manager

Which OS does this happen on?

🍎 macOS

OS details

13.1 (22C65)

Which CPU architecture are you running this on?

Apple M1/M2

What steps are needed to reproduce this?

  1. install shell integration
  2. type 'puls` and tab to auto complete
  3. nothing happens

  1. sudo rm -f /usr/local/bin/pulsar-beta
  2. sudo ln -s /Applications/Pulsar.app/Contents/Resources/pulsar.sh /usr/local/bin/pulsar
  3. type puls and tab to auto complete
  4. error The application //Applications cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=4101, _LSFunction=_LSOpenStuffCallLocal}

Additional Information:

No response

@srevenant
Copy link

The script was missing from the 'app' folder, but it was up a level (I noticed later).

In the end I just copied over the older atom.sh script, put it into the Contents/Resources/app folder, then search/replaced:

ATOM -> PULSAR
Atom -> Pulsar
atom -> pulsar

And it works.

@srevenant
Copy link

Looks like the problem might just be that pulsar.sh is in the wrong folder for where it's trying to glean paths.

I moved the distributed one from Contents/Resources/pulsar.sh into Contents/Resources/app/pulsar.sh, and it works fine.

@Soupertonic
Copy link
Contributor

In my PR I changed the script to only do three instead of four dirname calls. After that it worked just fine. What you have done replicates pretty much the same thing. Now, that leaves me wondering whether the script has just moved locations. So this would mean we could either just leave it be and do three instead of four dirname calls to resolve the correct path, or just put it in the correct place so that the four dirname calls resolve the correct path. I don't think there are any backwards compatibility concerns. What do you think @confused-Techie ?

@DeeDeeG
Copy link
Member

DeeDeeG commented Dec 25, 2022

#252 is a really helpful start to fix this. (It fixes the paths in the launcher script itself.) I have a WIP branch to fix the other half of this, specifically the part that symlinks the launcher script itself onto your PATH.

https://github.com/pulsar-edit/pulsar/compare/fix-installing-shell-commands-to-PATH (head of the branch is c22d463 at the time I'm commenting, but I may rebase it on top of some other commits before making a PR).

Haven't had time to draft the Pull Request up, but I can try to do that soon.

EDIT to add some context: Atom's old build scripts placed the launcher in a different spot in the app bundle. We use electron-builder now, which simplifies things quite a bit, but there are a fair amount of hard-coed things around the repo which we need to adjust to match the new behavior of electron-builder.

UPDATE: See PR #263 for my shot at the second half of the fix.

@DeeDeeG
Copy link
Member

DeeDeeG commented Dec 25, 2022

Still needs #263, I believe. Looking for an approve on that PR. Although if no-one else can get around to testing it I should be able to manually verify it myself and merge, if it comes to it.

Re-opening this issue for now until #263 can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants