File tree Expand file tree Collapse file tree
packages/cli/src/lib/addons Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { color , hux } from '@heroku/heroku-cli-util'
1+ import { color } from '@heroku/heroku-cli-util'
22import { HTTPError } from '@heroku/http-call'
33import * as Heroku from '@heroku-cli/schema'
44import printf from 'printf'
55
6+ import ConfirmCommand from '../confirmCommand.js'
7+
68export 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}
You can’t perform that action at this time.
0 commit comments