mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-03-21 11:35:54 +00:00
Omit confirmation interactivity with -y/--yes
This commit is contained in:
parent
0697510f38
commit
fed63fd178
@ -41,10 +41,13 @@ exports.restart = authHooks.failIfNotLoggedIn (id) ->
|
||||
server.post "/application/#{id}/restart", (error) ->
|
||||
throw error if error?
|
||||
|
||||
exports.remove = authHooks.failIfNotLoggedIn (id) ->
|
||||
exports.remove = authHooks.failIfNotLoggedIn (id, program) ->
|
||||
async.waterfall [
|
||||
|
||||
(callback) ->
|
||||
if program.parent.yes
|
||||
return callback(null, true)
|
||||
|
||||
widgets.confirmRemoval('application', callback)
|
||||
|
||||
(confirmed, callback) ->
|
||||
|
@ -5,6 +5,9 @@ packageJSON = require('../package.json')
|
||||
program = require('commander')
|
||||
program.version(packageJSON.version)
|
||||
|
||||
# ---------- Options ----------
|
||||
program.option('-y, --yes', 'Confirm non interactively')
|
||||
|
||||
# ---------- Auth Module ----------
|
||||
auth = require('./actions/auth')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user