nixpkgs/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch

19 lines
813 B
Diff

diff --git a/out/serverPath.js b/out/serverPath.js
index d25f5d4..289f0dd 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 path.join(this.context.globalStorageUri.fsPath, INSTALL_FOLDER_NAME);