1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: Debian doesn't have node-tern. This patch is making ycmd to
use locally installed tern with `npm install tern` command.
Forwarded: not-needed
--- a/ycmd/completers/javascript/tern_completer.py
+++ b/ycmd/completers/javascript/tern_completer.py
@@ -30,18 +30,13 @@
HTTP_OK = 200
-PATH_TO_TERN_BINARY = os.path.abspath(
- os.path.join(
- os.path.dirname( __file__ ),
- '..',
- '..',
- '..',
- 'third_party',
- 'tern_runtime',
- 'node_modules',
- 'tern',
+PATH_TO_TERN_BINARY = utils.PathToFirstExistingExecutable( [ 'tern' ] )
+if not PATH_TO_TERN_BINARY:
+ PATH_TO_TERN_BINARY = os.path.join(
+ os.path.expanduser('~'),
+ '.npm-packages',
'bin',
- 'tern' ) )
+ 'tern')
PATH_TO_NODE = utils.FindExecutable( 'node' )
|