Timeline for Node Program Runs in Terminal, but Not As a “do shell script” AppleScript
Current License: CC BY-SA 4.0
Post Revisions
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 1, 2019 at 3:41 | comment | added | Wayfaring Stranger | Oh, yes. AppleScript likes to send CR/LF or CR or LF, or some such combination, while Bash etc. expect something else. That'll kill your shell script too. It's in whatever manual Apple last put out (2015?) before the language got de-emphasized. | |
| Jul 31, 2019 at 11:03 | answer | added | mmmmmm | timeline score: 0 | |
| Jul 31, 2019 at 3:44 | comment | added | Wayfaring Stranger | The space in "mercury-parser https...." makes me think you might be better of using "quoted form of" rather than simple quotes in the do shell script version. | |
| Jul 31, 2019 at 0:12 | answer | added | Richard Fairbanks | timeline score: 3 | |
| Jun 28, 2019 at 0:28 | comment | added | Richard Fairbanks | Thanks, Mike, but I have not learned anything yet about solving this challenge. I have only simplified/clarified the question, as you recommended. There has been only one comment made (.bashrc) that addresses how to solve the question, but it was not successful. The question being asked is really quite simple . . . Do you suggest that I reduce my post further to just the first seven lines? As a rank newbie on this forum, am I doing something wrong here? | |
| Jun 27, 2019 at 20:40 | comment | added | bmike♦ | I would say rather than morphing this question as you unravel the onion, make an answer showing what you leaned here, select that answer, then ask a shorter follow on question with the new question at hand. | |
| Jun 27, 2019 at 20:37 | history | edited | Richard Fairbanks | CC BY-SA 4.0 |
added 426 characters in body
|
| Jun 27, 2019 at 20:29 | comment | added | Richard Fairbanks | Thank you, John; that was my assumption. Should I correct the title? What do you suggest? | |
| Jun 27, 2019 at 10:35 | comment | added | mmmmmm | Your path setting should be in ~/.bashrc. Running from desktop ie via automator does not go through a login shell so nothing in ~/.bash_profile is loaded. For the terminal ~/.bash_profile will be read - and that needs to source ~/.bashrc to save typing the commands twice. | |
| Jun 27, 2019 at 8:58 | comment | added | John Keates | It’s a shell/env issue indeed. Nothing node specific. | |
| Jun 27, 2019 at 6:27 | history | edited | Richard Fairbanks | CC BY-SA 4.0 |
added 51 characters in body; edited title
|
| Jun 25, 2019 at 21:34 | answer | added | bmike♦ | timeline score: 0 | |
| Jun 25, 2019 at 21:28 | history | edited | bmike♦ | CC BY-SA 4.0 |
deleted 31 characters in body; edited tags; edited title
|
| Jun 25, 2019 at 21:25 | comment | added | bmike♦ | I’m going to try and clarify things and remove the TIA / chit chat. Thanks for being gracious - but the site prefers no tags / signatures and you can put that all in your linked profile if needed. | |
| Jun 25, 2019 at 21:23 | comment | added | Gordon Davisson |
.bash_profile is only run for login shells. Terminal creates login shells, but AppleScript do shell script does not. You either need to add the relevant init steps to the do shell script section, or add them to .bashrc (which runs for non-login shells). It's for reasons like this that it's common to either have .bash_profile run .bashrc (and put the init script steps in .bashrc) or vice versa. But you should rewrite it so it doesn't add things to PATH over & over. See this question.
|
|
| Jun 25, 2019 at 21:02 | history | edited | Richard Fairbanks | CC BY-SA 4.0 |
added 1 character in body
|
| Jun 25, 2019 at 20:55 | history | asked | Richard Fairbanks | CC BY-SA 4.0 |