<commit_before>'use strict'

let co = require('co')
let cli = require('heroku-cli-util')
let helpers = require('../lib/helpers')
let Dyno = require('../lib/dyno')

function * run (context, heroku) {
  context.args.unshift('rake')
  let opts = {
    heroku: heroku,
    app: context.app,
    command: helpers.buildCommand(context.args),
    size: context.flags.size,
    'exit-code': context.flags['exit-code'],
    env: context.flags.env,
    'no-tty': context.flags['no-tty'],
    attach: true
  }
  if (!opts.command) throw new Error('Usage: heroku run COMMAND\n\nExample: heroku run bash')

  let dyno = new Dyno(opts)
  try {
    yield dyno.start()
  } catch (err) {
    if (err.exitCode) {
      cli.error(err)
      process.exit(err.exitCode)
    } else throw err
  }
}

module.exports = {
  topic: 'rake',
  hidden: true,
  variableArgs: true,
  needsAuth: true,
  needsApp: true,
  flags: [
    {name: 'size', char: 's', description: 'dyno size', hasValue: true},
    {name: 'exit-code', char: 'x', description: 'passthrough the exit code of the remote command'},
    {name: 'env', char: 'e', description: "environment variables to set (use ';' to split multiple vars)", hasValue: true},<commit_msg>removed unneeded check<commit_after>'use strict'

let co = require('co')
let cli = require('heroku-cli-util')
let helpers = require('../lib/helpers')
let Dyno = require('../lib/dyno')

function * run (context, heroku) {
  context.args.unshift('rake')
  let opts = {
    heroku: heroku,
    app: context.app,
    command: helpers.buildCommand(context.args),
    size: context.flags.size,
    'exit-code': context.flags['exit-code'],
    env: context.flags.env,
    'no-tty': context.flags['no-tty'],
    attach: true
  }

  let dyno = new Dyno(opts)
  try {
    yield dyno.start()
  } catch (err) {
    if (err.exitCode) {
      cli.error(err)
      process.exit(err.exitCode)
    } else throw err
  }
}

module.exports = {
  topic: 'rake',
  hidden: true,
  variableArgs: true,
  needsAuth: true,
  needsApp: true,
  flags: [
    {name: 'size', char: 's', description: 'dyno size', hasValue: true},
    {name: 'exit-code', char: 'x', description: 'passthrough the exit code of the remote command'},
    {name: 'env', char: 'e', description: "environment variables to set (use ';' to split multiple vars)", hasValue: true},
{'fraction_non_alphanumeric': 0.16401889222842422, 'fraction_numerical': 0.0, 'mean_word_length': 3.4380952380952383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '715837', 'n_tokens_mistral': 813, 'n_tokens_neox': 803, 'n_words': 218}