Skip to content

Commit

Permalink
πŸ› Fix a bug caught by ts
Browse files Browse the repository at this point in the history
  • Loading branch information
trickypr committed Dec 26, 2022
1 parent 806481b commit 239ad47
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,20 @@

import { bin_name, config } from '..'
import { log } from '../log'
import {
downloadInternals
} from './download/firefox'
import { downloadInternals } from './download/firefox'
import { getLatestFF } from '../utils'

export const update = async (): Promise<void> => {
const version = await getLatestFF(config.version.product)
if (version == config.version.product.version) {
log.error(`Firefox is already the latest version.`)
process.exit(1)

if (version == config.version.version) {
log.error(`Firefox is already the latest version.`)
process.exit(1)
}


// We are using force here to delete the engine directory if it already
// exists to make way for the new version.
await downloadInternals({version, force: true})
await downloadInternals({ version, force: true })

log.success(
`Firefox has successfully been updated to ${version}.`,
Expand Down

0 comments on commit 239ad47

Please sign in to comment.