as of rev. 469, the custom $PATH var I export from ~/.bash_profile does not show up in a command *if* the command has a shebang. I don't know if this is intended behavior but I had a snippet with :
#!/bin/sh
at the top and $PATH was not set the same way it is when I leave off the shebang and let TextMate parse the command through bin/sh. I only added the shebang when trying to debug something so obviously the workaround (for bash anyway) is to leave off the shebang. K
On 26/09/2005, at 17.00, Kumar McMillan wrote:
as of rev. 469, the custom $PATH var I export from ~/.bash_profile does not show up in a command *if* the command has a shebang. I don't know if this is intended behavior
It is at least well-known, and happens because the shebang will cause the system to run the interpreter command directly, and not through the shell. And it's the shell that grabs those variables from your profiles (by sourcing them into the running environment before the command is run). #!/bin/bash might/should work, but of course it might as well be left out in that case :-p.
For other interpreters, start it manually instead, for now (and don't use shebang).
-- Sune.