summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorRyan Horiguchi <ryan.horiguchi@gmail.com>2021-03-26 22:23:25 +0100
committerRyan Horiguchi <ryan.horiguchi@gmail.com>2021-03-26 22:26:24 +0100
commit9a40230c86f97db3830bc6416c986cf3a3c22a36 (patch)
treea660ceed492230f805b16a96583a9412e1677ac5 /pkgs/misc
parent8880a6732ec18add5f1c0b5b6c50be971f867303 (diff)
downloadnixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.tar
nixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.tar.gz
nixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.tar.bz2
nixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.tar.lz
nixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.tar.xz
nixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.tar.zst
nixpkgs-9a40230c86f97db3830bc6416c986cf3a3c22a36.zip
vscode-extensions.hashicorp.terraform: 2.8.3 -> 2.9.1
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/vscode-extensions/terraform/default.nix4
-rw-r--r--pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch37
2 files changed, 27 insertions, 14 deletions
diff --git a/pkgs/misc/vscode-extensions/terraform/default.nix b/pkgs/misc/vscode-extensions/terraform/default.nix
index 7c9eaa65618..fbfb7c06dc5 100644
--- a/pkgs/misc/vscode-extensions/terraform/default.nix
+++ b/pkgs/misc/vscode-extensions/terraform/default.nix
@@ -3,13 +3,13 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
   mktplcRef = {
     name = "terraform";
     publisher = "hashicorp";
-    version = "2.8.3";
+    version = "2.9.1";
   };
 
   vsix = fetchurl {
     name = "${mktplcRef.publisher}-${mktplcRef.name}.zip";
     url = "https://github.com/hashicorp/vscode-terraform/releases/download/v${mktplcRef.version}/terraform-${mktplcRef.version}.vsix";
-    sha256 = "1cng82q9079qmn5q71h9knh9qzhqrl3phaamkqfjy1jallgi43b1";
+    sha256 = "1i4pzxw57hf2g7x62hfsb588b1lz3zjjh8ny96qqrif2bj2h887z";
   };
 
   patches = [ ./fix-terraform-ls.patch ];
diff --git a/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch b/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
index 9c076d06df4..d91ffcc17ab 100644
--- a/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
+++ b/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
@@ -1,25 +1,38 @@
 diff --git a/out/extension.js b/out/extension.js
-index 4a2c6a9..158fe28 100644
+index e44cef2..fba0899 100644
 --- a/out/extension.js
 +++ b/out/extension.js
-@@ -215,19 +215,7 @@ function pathToBinary() {
-         if (!_pathToBinaryPromise) {
-             let command = vscodeUtils_1.config('terraform').get('languageServer.pathToBinary');
-             if (!command) { // Skip install/upgrade if user has set custom binary path
--                const installDir = `${extensionPath}/lsp`;
--                const installer = new languageServerInstaller_1.LanguageServerInstaller(reporter);
+@@ -141,24 +141,6 @@ function updateLanguageServer() {
+     return __awaiter(this, void 0, void 0, function* () {
+         const delay = 1000 * 60 * 24;
+         setTimeout(updateLanguageServer, delay); // check for new updates every 24hrs
+-        // skip install if a language server binary path is set
+-        if (!vscodeUtils_1.config('terraform').get('languageServer.pathToBinary')) {
+-            const installer = new languageServerInstaller_1.LanguageServerInstaller(installPath, reporter);
+-            const install = yield installer.needsInstall();
+-            if (install) {
+-                yield stopClients();
 -                try {
--                    yield installer.install(installDir);
+-                    yield installer.install();
 -                }
 -                catch (err) {
 -                    reporter.sendTelemetryException(err);
 -                    throw err;
 -                }
 -                finally {
--                    yield installer.cleanupZips(installDir);
+-                    yield installer.cleanupZips();
 -                }
--                command = `${installDir}/terraform-ls`;
-+                command = 'TERRAFORM-LS-PATH';
+-            }
+-        }
+         return startClients(); // on repeat runs with no install, this will be a no-op
+     });
+ }
+@@ -256,7 +238,7 @@ function pathToBinary() {
+                 reporter.sendTelemetryEvent('usePathToBinary');
              }
              else {
-                 reporter.sendTelemetryEvent('usePathToBinary');
+-                command = path.join(installPath, 'terraform-ls');
++                command = 'TERRAFORM-LS-PATH';
+             }
+             _pathToBinaryPromise = Promise.resolve(command);
+         }