[TxMt] Re: ar misbehaves in bundle command

Sol Foster colomon at ralf.org
Sat Dec 6 15:02:57 UTC 2008


Allan Odgaard <mailinglist at ...> writes:
> On 4 Dec 2008, at 13:16, Sol Foster wrote:
> > [...]
> > I'm hoping someone has an idea what might be going on here, because  
> > TextMate
> > will be a dream if I can get this working properly.
> 
> My best guess is that you have more than one version of the shell  
> commands involved, and TextMate uses another one due to different PATH  
> setting.
> 
> When your command does not have a shebang, TextMate will source your  
> profiles to try and get the same environment as a Terminal session,  
> you can bypass this by putting a shebang in your command (e.g. #!/bin/ 
> sh).
> 
> For more details see
http://manual.macromates.com/en/shell_commands.html#search_path
> 
> Although if you say it works in Terminal, it does sound like you want  
> the behavior, although if you are using something other than bash in  
> Terminal, the environment will not be the same. Anyway, the  
> environment is what you want to look at, particularly the PATH variable.

I added "which ar" to the build script, and it was the same whether I fired it
off from Terminal or TextMate.  But following this idea, I dumped the
environment in the build script and compared Terminal and TextMate.  

Bingo!  When executed from TextMate, COMMAND_MODE=legacy; from the Terminal it's
COMMAND_MODE=unix2003.  Apparently ar behaves differently depending on the two
settings.  I don't know how to change that in TextMate (or why it is different),
but it was easy enough to add COMMAND_MODE=unix2003 to my build script, and now
the builds work just fine.

Thanks!

--Sol





More information about the textmate mailing list