Skip to content

Commit

Permalink
fix: determine current version helper (oclif#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasPhilCo authored Feb 11, 2021
1 parent 15bd232 commit 94e7d61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default class UpdateCommand extends Command {

private async determineCurrentVersion(): Promise<string|undefined> {
try {
const currentVersion = await fs.readlink(path.join(this.clientRoot, 'current'))
const currentVersion = await fs.readFile(path.join(this.clientRoot, 'bin', this.config.bin), 'utf8')
const matches = currentVersion.match(/\.\.[/|\\](.+)[/|\\]bin/)
return matches ? matches[1] : this.config.version
} catch (error) {
Expand Down

0 comments on commit 94e7d61

Please sign in to comment.