summary refs log tree commit diff
path: root/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
blob: e2dcd0b70aa9912f779ecb0d7758355353f67f3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/out/serverPath.js b/out/serverPath.js
index fafa915..2e6d376 100644
--- a/out/serverPath.js
+++ b/out/serverPath.js
@@ -18,7 +18,13 @@ exports.CUSTOM_BIN_PATH_OPTION_NAME = 'languageServer.pathToBinary';
 class ServerPath {
     constructor(context) {
         this.context = context;
-        this.customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME);
+
+        const customBinPath = vscode.workspace.getConfiguration('terraform').get(exports.CUSTOM_BIN_PATH_OPTION_NAME);
+        if (!customBinPath) {
+          this.customBinPath = 'TERRAFORM-LS-PATH';
+        } else {
+            this.customBinPath = customBinPath;
+        }
     }
     installPath() {
         return path.join(this.context.globalStorageUri.fsPath, INSTALL_FOLDER_NAME);