4

Setup: Portable editions of Sublime Text 2 with its plugin Sublimelinter and node.exe.

sublimelinter_executable_map has to set in a way so that Sublimelinter uses node.exe as JavaScript engine.

Could one do this using a relative path instead of a fully qualified path?

Trying with different forms of relative paths as given in MSDN, the plugin failed to detect node.exe. The console message i got was SublimeLinter: javascript disabled (One of the following JavaScript engines must be installed: node.js, JavaScriptCore)

  • Windows shortcuts and start menu entries can set the working directory of the Sublime Text executable. If any paths are relative, I guess they are relative to this working directory. You can confirm from SublimeLinter source code if the plugin allows relative path inputs: https://github.com/SublimeLinter/SublimeLinter – Mikko Ohtamaa Dec 05 '13 at 22:25

1 Answers1

0

Your GitHub issue on this topic:

Is a duplicate of these:

This seems to be a hot topic.

I forked the repository and started to code a patch for you, which seems to center around this segment:

https://github.com/SublimeLinter/SublimeLinter/blob/4ef4b2ca08e0224b8af59bf3406c4927432efb94/sublimelinter/modules/base_linter.py#L380

But then, it dawned on me... environment variables. Since this seems to be a prevalent issue with many unsolved requests, it seems that you ought to set the PATH environment variable, and place the location you are looking to be found first, earlier in that variable.

Don't know your Windows version, and the process to set an environment variable will be different for your version, so you ought to experiment with that, and then use that method as the standard for all your environments ( as it seems implied you have more than one to maintain ).

Update: Ruby seems to allow relative paths, but JavaScript does not, because of this section:

https://github.com/SublimeLinter/SublimeLinter/blob/4ef4b2ca08e0224b8af59bf3406c4927432efb94/sublimelinter/modules/base_linter.py#L380

Which hinges on: JAVASCRIPT_ENGINE_WRAPPERS_PATH

So the answer is, unless that code is adapted, no. Relative paths cannot be used for JS.

digitalextremist
  • 5,952
  • 3
  • 43
  • 62
  • PATHS are good but since this is a portable setup, i am interested in using relative paths inside 'sublimelinter_executable_map' –  Dec 10 '13 at 12:46