diff --git a/changelog.d/144.fixed.md b/changelog.d/144.fixed.md new file mode 100644 index 00000000..3f9637ae --- /dev/null +++ b/changelog.d/144.fixed.md @@ -0,0 +1 @@ +Fixed an issue where `mirrord.autoUpdate` set to an empty string prevented the extension from downloading mirrord binary. Improved notifications related to auto update. \ No newline at end of file diff --git a/src/binaryManager.ts b/src/binaryManager.ts index 3aa490c4..7ed61f01 100644 --- a/src/binaryManager.ts +++ b/src/binaryManager.ts @@ -22,9 +22,9 @@ function getExtensionMirrordPath(): Uri { /** * Tries to find local mirrord in path or in extension storage. * @param version If specified, then the version of the binary is checked and matched path is returned. - * @returns Path to mirrord binary or null if not found + * @returns (path to mirrord binary, whether it was found in $PATH) or null if not found */ -export async function getLocalMirrordBinary(version: string | null): Promise { +export async function getLocalMirrordBinary(version: string | null): Promise<[string, boolean] | null> { try { const mirrordPath = await which("mirrord"); if (version) { @@ -35,14 +35,15 @@ export async function getLocalMirrordBinary(version: string | null): Promise { - let latestVersion; - let wantedVersion = null; + let latestVersion: string | null; + let wantedVersion: string | null = null; try { latestVersion = await getLatestSupportedVersion(background); @@ -129,55 +131,63 @@ export async function getMirrordBinary(background: boolean): Promise