Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rudiau

macrumors newbie
Original poster
Sep 4, 2022
2
0
This simple script suddenly stopped working on my MBP Monterey 15.5.1. However it still works in my mac mini Monterey 15.5 and my MBP Catalina. The script refuses to Change Directory (cd) no matter what I try. The result being the "npm run start" command is presented to the normal command line not the MagicMirror directory. Thanks for any help/advice.

AppleScript:
tell application "Terminal"
    activate
    set shell to do script "cd MagicMirror"
    delay 1
    do script "npm run start" in shell
end tell[/CODE[ATTACH type="full"]2050866[/ATTACH][ATTACH type="full"]2050867[/ATTACH][ATTACH]2050866[/ATTACH]
 

Attachments

  • DoesNotWrk.png
    DoesNotWrk.png
    173 KB · Views: 140
  • Workinng.png
    Workinng.png
    134.4 KB · Views: 69

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,011
Try with SIP disabled.
(csrutil disable from Terminal in Recovery)
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,244
4,931
Mimic of that working for me (cd with an ls in folder).

Might want to try this:

Code:
tell application "Terminal"
    do script "cd MagicMirror; sleep 1; npm run start"
    activate
end tell
 
Last edited:

rudiau

macrumors newbie
Original poster
Sep 4, 2022
2
0
Hi bogdanw, NoBoMac
While neither of your suggestions worked, bogdanw you nudged me in the right direction in that i thought is there anything else i can disable.
Turns out I had forgotten a small util I had installed, an autocomplete app called Fig.app, broke Automator.
Uninstalled Fig my Automator app worked normally, reinstalled it stopped working.
Thank you both for your time and patience.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.