Skip to content

Commit

Permalink
Fix(run): arguments are incorrectly gathered leading to duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwilaby committed Aug 29, 2024
1 parent 2aa043a commit 5b837bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/cli/src/commands/run/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ux} from '@oclif/core'
import debugFactory from 'debug'
import * as Heroku from '@heroku-cli/schema'
import Dyno from '../../lib/run/dyno'
import {buildCommand, revertSortedArgs} from '../../lib/run/helpers'
import {buildCommand} from '../../lib/run/helpers'

const debug = debugFactory('heroku:run')

Expand Down Expand Up @@ -33,14 +33,14 @@ export default class Run extends Command {

async run() {
const {argv, flags} = await this.parse(Run)
const userArgvInputOrder = revertSortedArgs(process.argv, argv as string[])

const maybeOptionsIndex = process.argv.indexOf(' -- ')
const command = buildCommand((maybeOptionsIndex === -1 ? argv : process.argv.slice(maybeOptionsIndex)) as string[])
const opts = {
'exit-code': flags['exit-code'],
'no-tty': flags['no-tty'],
app: flags.app,
attach: true,
command: buildCommand(userArgvInputOrder as string[]),
command,
env: flags.env,
heroku: this.heroku,
listen: flags.listen,
Expand Down

0 comments on commit 5b837bf

Please sign in to comment.