Skip to content

Commit

Permalink
✨ improve: which-pm
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymears committed Jun 14, 2023
1 parent 29b50ed commit 420fe85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/@roots/bud/src/cli/commands/bud.upgrade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Command, Option} from '@roots/bud-support/clipanion'
import {bind} from '@roots/bud-support/decorators/bind'
import {BudError} from '@roots/bud-support/errors'
import isString from '@roots/bud-support/lodash/isString'
import {getPackageManagerField} from '@roots/bud-support/which-pm'
import whichPm from '@roots/bud-support/which-pm'
import BudCommand from '@roots/bud/cli/commands/bud'
import {dry} from '@roots/bud/cli/decorators/dry'

Expand Down Expand Up @@ -59,7 +59,7 @@ export default class BudUpgradeCommand extends BudCommand {

public override async execute() {
await this.makeBud()
const pacman = await getPackageManagerField(this.bud.context.basedir)
const pacman = await whichPm(this.bud.context.basedir)
if (!isString(pacman) || ![`npm`, `yarn`].includes(pacman)) {
throw new BudError(`bud upgrade only supports yarn classic and npm.`)
}
Expand Down

0 comments on commit 420fe85

Please sign in to comment.