Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteregrets committed Oct 29, 2023
1 parent 12b1a7f commit cd959da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 8 additions & 1 deletion src/binaryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ export async function getMirrordBinary(extensionActivate?: boolean): Promise<str
const latestVersion = await getLatestSupportedVersion(10000);
const autoUpdateConfigured = vscode.workspace.getConfiguration().get("mirrord.autoUpdate");
const extensionPath = getExtensionMirrordPath().fsPath;

// check the type can be only null, string or boolean
if (typeof autoUpdateConfigured !== 'boolean' && typeof autoUpdateConfigured !== 'string' && autoUpdateConfigured !== null) {
vscode.window.showErrorMessage(`Invalid autoUpdate setting ${autoUpdateConfigured}: must be a boolean or a string`);
return extensionPath;
}


// if extension is activating, then set a global state to what was read in the workspace settings
if (extensionActivate) {
Expand Down Expand Up @@ -163,7 +170,7 @@ export async function getMirrordBinary(extensionActivate?: boolean): Promise<str
}
}

// Auto-update is enabled or no specific version specified.

const localMirrordBinary = await getLocalMirrordBinary(latestVersion);
if (localMirrordBinary) {
return localMirrordBinary;
Expand Down
7 changes: 0 additions & 7 deletions test-workspace/.vscode/settings.json

This file was deleted.

0 comments on commit cd959da

Please sign in to comment.