corpnewt / MountEFI

An even more robust edition of my previous MountEFI scripts
1.07k stars 119 forks source link

Quick Action Python3 path #16

Closed gazzmanzx6 closed 2 years ago

gazzmanzx6 commented 2 years ago

Trying to use the Quick Action it seems to be looking at /usr/local/bin/python3. On both my Macs with macOS 12.3 the path to Python is actually /usr/bin/python3. Mount EFI.zip

I have created a Shortcuts file using your scripts that does work fine and shows in the Quick Actions menu.

corpnewt commented 2 years ago

Yeah - I've noticed some pathing discrepancies depending on where python is installed. I think I might approach it in a similar way to building the .app bundle, and use a helper script to scrape for and present the located python paths - then build an automator quick action based on a template.

If I have time today, I'll put that together.

-CorpNewt

corpnewt commented 2 years ago

If you have some time - can you test the following:

Mount EFI Automator Quick Action.zip

I revised the approach to avoid running the shell script directly through Automator (which would require the shell paths be updated per machine), and instead use Applescript to gather pathing, check for the existence of python or python3, and then pipe the path to a MountEFIQA.py script (which was a part of the Automator action prior) to the detected python version.

I tested python 2.7.18 installed from python.org, python 3.10.4 from python.org, and python 3.8.9 from Xcode's command line tools - and it was able to find them all as expected.

If it works for you as well, I'll push it to the main repo.

-CorpNewt

corpnewt commented 2 years ago

I had some other users test - and it seems to work, so I've pushed it in this commit.

-CorpNewt

gazzmanzx6 commented 2 years ago

That seems to have fixed it. Thanks for the quick response.