Skip to content

Commit 16fe118

Browse files
committed
Revert change to trapConfirmationRequired
1 parent ed5ec7c commit 16fe118

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/cli/src/lib/addons/util.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import {color, hux} from '@heroku/heroku-cli-util'
1+
import {color} from '@heroku/heroku-cli-util'
22
import {HTTPError} from '@heroku/http-call'
33
import * as Heroku from '@heroku-cli/schema'
44
import printf from 'printf'
55

6+
import ConfirmCommand from '../confirmCommand.js'
7+
68
export const trapConfirmationRequired = async <T> (app: string, confirm: string | undefined, fn: (confirmed?: string) => Promise<T>) => {
79
try {
810
return await fn(confirm)
@@ -11,7 +13,7 @@ export const trapConfirmationRequired = async <T> (app: string, confirm: string
1113
throw error
1214
}
1315

14-
await hux.confirmCommand({comparison: app, confirmation: confirm, warningMessage: error.body.message})
16+
await new ConfirmCommand().confirm(app, confirm, error.body.message)
1517
return fn(app)
1618
}
1719
}

0 commit comments

Comments
 (0)