about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
blob: 2f34d09fd11512dd84ca6f0832e6512e9672823d (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 ffb1b80..990ca2b 100644
--- a/out/serverPath.js
+++ b/out/serverPath.js
@@ -8,7 +8,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 this.context.asAbsolutePath(INSTALL_FOLDER_NAME);