Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpogran committed Dec 9, 2021
1 parent cbb46ae commit 2fafd8e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export async function updateTerraformStatusBar(documentUri: vscode.Uri): Promise
}

async function updateLanguageServer(extVersion: string, lsPath: ServerPath, scheduled = false) {
if (config('extensions').get<boolean>('autocheck', true) === true) {
if (config('extensions').get<boolean>('autoCheckUpdates', true) === true) {
console.log('Checking for language server updates...');
const hour = 1000 * 60 * 60;
languageServerUpdater.timeout(function () {
Expand Down
1 change: 0 additions & 1 deletion src/installer/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export async function installTerraformLS(
): Promise<void> {
const userAgent = `Terraform-VSCode/${extensionVersion} VSCode/${vscodeVersion}`;

// install
reporter.sendTelemetryEvent('installingLs', { terraformLsVersion: release.version });

const zipfile = path.resolve(installPath, `terraform-ls_v${release.version}.zip`);
Expand Down
9 changes: 1 addition & 8 deletions src/installer/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ export async function updateOrInstall(
if (installedVersion === undefined) {
console.log(`Currently installed Terraform language server is version '${installedVersion}`);
// ls is present but too old to tell us the version, need to update now
// TODO remove existing
// TODO install
return installTerraformLS(lsPath.installPath(), release, extensionVersion, vscodeVersion, reporter);
}

console.log(`Currently installed Terraform language server is version '${installedVersion}`);
reporter.sendTelemetryEvent('foundLsInstalled', { terraformLsVersion: installedVersion });

if (semver.eq(release.version, installedVersion, { includePrerelease: true })) {
Expand All @@ -78,12 +77,6 @@ export async function updateOrInstall(
return;
}

console.log(`Currently installed Terraform language server is version '${installedVersion}`);
// if (autoUpdate === false) {
// // update indicated but user does not want automatic updates
// return;
// }

// update indicated and user wants autoupdates
if (semver.gt(release.version, installedVersion, { includePrerelease: true })) {
// Upgrade
Expand Down

0 comments on commit 2fafd8e

Please sign in to comment.