 pkgJson = require __dirname + '/package.json'
 
 globalVerbose   = false
+verboseFlag     = '-v, --verbose'
+verboseText     = 'verbose output'
 nodeVersion     = pkgJson.engines.node
 resources       = __dirname + '/resources/'
 validNameRx     = /^[A-Z][0-9A-Z]*$/i


cli.command 'setdevice <index>'
  .description 'choose simulator device by index'
  .action (index) ->
    unless device = getDeviceList()[parseInt index, 10]
      logErr 'Invalid device index. Run natal listdevices for valid indexes.'


  process.exit 1


verboseDec = (fn) ->
  (..., cmd) ->
    globalVerbose = cmd.verbose
    fn.apply cli, arguments


exec = (cmd, keepOutput) ->
  if globalVerbose and !keepOutput
    return child.execSync cmd, stdio: 'inherit'
