Skip to content

Commit

Permalink
refactor: migrate run:inside command to oclif/core v2
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman committed May 13, 2024
1 parent 88e653b commit ecc0848
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/cli/src/commands/run/inside.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// tslint:disable:file-name-casing
import {Command, flags} from '@heroku-cli/command-v9'
import {CliUx} from '@oclif/core-v1'
import '@oclif/core-v1/lib/parser'
import {Command, flags} from '@heroku-cli/command'
import {ux} from '@oclif/core'
import debugFactory from 'debug'
import Dyno from '@heroku-cli/plugin-run/lib/lib/dyno'
import {buildCommand} from '@heroku-cli/plugin-run/lib/lib/helpers'
import Dyno from '../../lib/run/dyno'
import {buildCommand} from '../../lib/run/helpers'

const debug = debugFactory('heroku:run:inside')

Expand Down Expand Up @@ -37,8 +35,8 @@ export default class RunInside extends Command {
const opts = {
'exit-code': flags['exit-code'],
app: flags.app,
command: buildCommand(argv.slice(1)),
dyno: argv[0],
command: buildCommand(argv.slice(1) as string[]),
dyno: argv[0] as string,
env: flags.env,
heroku: this.heroku,
listen: flags.listen,
Expand All @@ -51,7 +49,7 @@ export default class RunInside extends Command {
} catch (error: any) {
debug(error)
if (error.exitCode) {
CliUx.ux.exit(error.exitCode)
ux.exit(error.exitCode)
} else {
throw error
}
Expand Down

0 comments on commit ecc0848

Please sign in to comment.