Skip to content

Commit

Permalink
Check if only server file exist, don't check if node_moduels exist
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Sep 16, 2019
1 parent f6cda67 commit 80128ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@


def plugin_loaded():
print('LSP-vue: Server {} installed.'.format('is' if os.path.isfile(server_path) else 'is not' ))
is_server_installed = os.path.isfile(server_path)
print('LSP-vue: Server {} installed.'.format('is' if is_server_installed else 'is not' ))

# install the node_modules if not installed
if not os.path.isdir(os.path.join(package_path, 'node_modules')):
# install if not installed
if not is_server_installed:
# this will be called only when the plugin gets:
# - installed for the first time,
# - or when updated on package control
Expand Down

0 comments on commit 80128ad

Please sign in to comment.