Skip to content

Commit

Permalink
fix: debug error instead of warn (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley authored Apr 26, 2024
1 parent b962507 commit 12794f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,12 @@ const determineCurrentVersion = async (clientBin: string, version: string): Prom
const currentVersion = await readFile(clientBin, 'utf8')
const matches = currentVersion.match(/\.\.[/\\|](.+)[/\\|]bin/)
return matches ? matches[1] : version
} catch (error: unknown) {
ux.warn(error as Error | string)
} catch (error) {
if (error instanceof Error) {
ux.debug(error.name, error.message)
} else if (typeof error === 'string') {
ux.debug(error)
}
}

return version
Expand Down

0 comments on commit 12794f4

Please sign in to comment.