diff --git a/src/commands/install.ts b/src/commands/install.ts index 4f222728..67d484c2 100644 --- a/src/commands/install.ts +++ b/src/commands/install.ts @@ -44,12 +44,17 @@ export default class InstallCommand extends UpdateCommand { .filter((dirOrFile) => dirOrFile !== 'bin' && dirOrFile !== 'current'); if (versions.includes(targetVersion)) { + this.log( + `Found ${targetVersion} installed locally. Attempting to switch to ${targetVersion} now.`, + ); + await this.updateToExistingVersion(targetVersion); this.currentVersion = await this.determineCurrentVersion(); this.updatedVersion = targetVersion; if (channelUpdateRequested) { await this.setChannel(); } + this.log(`Success! You are now on ${targetVersion}!`); } else { const explicitVersion = isExplicitVersion ? targetVersion : null; cli.action.start(`${this.config.name}: Updating CLI`); @@ -67,7 +72,9 @@ export default class InstallCommand extends UpdateCommand { this.debug('tidy'); await this.tidy(); await this.config.runHook('update', { channel: this.channel }); - + this.log( + `Success! Installed ${targetVersion}. You are now on ${targetVersion}!`, + ); this.debug('done'); cli.action.stop(); } diff --git a/src/commands/update.ts b/src/commands/update.ts index 7967b253..90892d0a 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -178,7 +178,7 @@ export default class UpdateCommand extends Command { bin: this.config.bin, platform: this.config.platform, arch: this.config.arch, - ext: targetVersion ? 'tar.gz' : 'gz', + ext: targetVersion ? '.tar.gz' : 'gz', }), ); const { response: stream } = await http.stream(gzUrl);