Skip to content

Commit

Permalink
fix: use clientBin property for reading version (oclif#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasPhilCo authored Mar 17, 2021
1 parent 144a350 commit 800dba6
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 @@ -223,7 +223,7 @@ export default class UpdateCommand extends Command {

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

0 comments on commit 800dba6

Please sign in to comment.