[TxMt] Re: TM_PROJECT_DIR unset in callback.document.did-reload

René Schwaiger sanssecours at f-m.fm
Tue Aug 30 12:08:00 UTC 2016


Hi Stefan,

> On 30 Aug 2016, at 13:38 , Stefan Daschek <stefan at daschek.net> wrote:
> 
> I’m trying to make the RuboCop bundle work with the new callback.document.did-reload. However, it seems when a command is run from this callback, that TM_PROJECT_DIR is not set. Is this expected?

I think you want `TM_PROJECT_DIRECTORY` instead of `TM_PROJECT_DIR`. And yes, this variable might not be set [1]:

> • TM_PROJECT_DIRECTORY — the top-level folder in the project drawer (may not be set).

[1]: https://manual.macromates.com/en/environment_variables.html

> (I tried with and without filebrowser, and even after explicitly setting a project directory with “Use «folder» as Project Folder”).
> 
> 
> Stefan


Kind regards,
  René


More information about the textmate mailing list