How to use the heroku-cli-util.exit function in heroku-cli-util

To help you get started, we’ve selected a few heroku-cli-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heroku / cli / client / lib / commands / auth / whoami.js View on Github external
function * run () {
  const Heroku = require('heroku-client')

  if (process.env.HEROKU_API_KEY) {
    cli.warn('HEROKU_API_KEY is set. Not using netrc credentials.')
  }
  let token = cli.auth.token()
  if (!token) cli.exit(1, 'not logged in')
  let heroku = new Heroku({token})
  let account = yield heroku.get('/account')
  cli.log(account.email)
}
github xavdid / heroku-config / commands / push.js View on Github external
function* patchConfig(context, heroku, payload, success) {
  try {
    yield heroku.patch(`/apps/${context.app}/config-vars`, { body: payload })
    if (!context.flags.quiet) {
      cli.log(success)
    }
  } catch (err) {
    cli.exit(1, err)
  }
}

heroku-cli-util

Set of helpful CLI utilities

ISC
Latest version published 5 years ago

Package Health Score

47 / 100
Full package analysis

Similar packages