[TxMt] how to get TextMate environment variables from rakefile?

Matt Neuburg matt at tidbits.com
Mon Dec 9 23:05:15 UTC 2013


I am running a rakefile directly from Ruby, in order to run some tests.
The tests work fine when run individually from inside TextMate 2, but
some of them break when run thru the rakefile directly from Ruby. The
reason is that those tests use the TM_SUPPORT_PATH environment variable.
That variable doesn't exist when we are running the rakefile directly
from Ruby.

Is there a way my rakefile script can ask TextMate for the value of its
TM_SUPPORT_PATH even though it is not running inside TextMate? I can
solve the problem by just hard-coding the answer into my rakefile, but
that is not a portable solution.

(Indeed, the issue arose in the first place because I *was* hard-coding
the answer into my rakefile, using TextMate 1; but in TextMate 2, the
value of TM_SUPPORT_PATH has changed. That's why I'd like a way to ask
TextMate directly "what's your TM_SUPPORT_PATH?")

Thx - m.

-- 
matt neuburg, phd = matt at tidbits.com, http://www.apeth.net/matt/
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html



More information about the textmate mailing list