Something broke running shell scripts
Seems to be caused by the PATH environment variable being constructed differently.
Specifically this change; Fixed an issue on Yosemite where the PATH environment variable value was not correct. made in v0.142.0 seems to be the culprit.
Or, maybe the error is because 'Shell Script (Bash)' has been accidentally quoted here (in the lib/grammars.coffee file?
Ruby:
"Selection Based":
command: "ruby"
args: (context) -> ['-e', context.getCode()]
"File Based":
command: "ruby"
args: (context) -> [context.filepath]
'Ruby on Rails':
"Selection Based":
command: "rails"
args: (context) -> ['runner', context.getCode()]
"File Based":
command: "rails"
args: (context) -> ['runner', context.filepath]
'Shell Script (Bash)':
"Selection Based":
command: "bash"
args: (context) -> ['-c', context.getCode()]
"File Based":
command: "bash"
args: (context) -> [context.filepath]
Or, maybe the error is because 'Shell Script (Bash)' has been accidentally quoted here
The quotes are required since spaces/special characters are used in the key name.
I'll check this out when I get home and have a Yosemite machine.
I'm having the exact same issue as danielbayley described.
Actually this is a much bigger problem than I thought; nothing will run at all now in any language.
Yosemite can't be the issue since it's been working fine prior to this ever since I upgraded last month.
I hard coded my correct PATH environment variable into Atom's init.coffee script but the problem persists.
So I would say it must be something that has changed in the latest couple of updates to Atom itself. Hopefully that might narrow it down a little.
I think this may be related to the PATH change commit in OS X - atom/atom@6a58f60 from the v0.142.0 release of Atom. I'm still stuck to only a Mavericks system at this point. I'll test this when possible. It does sound like an issue with Atom detecting the PATH vs. anything from Script. I'd appreciate if you could show a screenshot of the error and show the value of PATH.
Configuration (with Mavericks)

Oh, and a screenshot of this working using the latest Atom release on Mavericks.

See atom/atom-shell#550
Yeah I came across that issue thread and suspected it might have something to do with the problem, so I did a few tests.
So if I open Atom the usual way (for me) from my dock, then the PATH is the wrong cut down version, whereas if I launch Atom from Terminal then the PATH is correct (as in, matching the PATH set in my ~/.bashrc). The latter being what I think that PR has addressed for folks who open Atom that way, but is of little use to me. For now anyway, I've fixed this by hard coding the correct PATH into the init.coffee script as I mentioned before.
Scratch what I said before about Script not running in any language, since applying the above 'fix', the problem now does seem to be confined to bash (iv'e been running system attribute "PATH" using Script to check it under AppleScript, and I also tested JavaScript and others which also work).
So I guess it can't be the PATH after all?
##AppleScript

##Bash

The grammar that failed in your case is "Shell Script". That leads me to believe the grammar detection is at fault. As far as I know grammars.coffee includes different variants of Shell Script but would report "Shell Script (Bash)" or similar instead. I'll post a possible patch for that issue once I'm at the keyboard which I'd like you to test.
Sent from my iPhone
On Nov 9, 2014, at 13:45, Daniel [email protected] wrote:
Yeah I came across that issue thread and suspected it might have something to do with the problem, so I did a few tests.
So if I open Atom the usual way (for me) from my dock, then the PATH is the wrong cut down version, whereas if I launch Atom from Terminal then the PATH is correct (as in, matching the PATH set in my ~/.bashrc). The latter being what I think that PR has addressed for folks who open Atom that way, but is of little use to me. For now anyway, I've fixed this by hard coding the correct PATH into the init.coffee script as I mentioned before.
Scratch what I said before about Script not running in any language, since applying the above 'fix', the problem now does seem to be confined to bash (iv'e been running system attribute "PATH" using Script to check it under AppleScript, and I also tested JavaScript and others which also work).
So I guess it can't be the PATH after all?
##AppleScript
##Bash
— Reply to this email directly or view it on GitHub.
Sure, will do.