diff --git a/lib/actions/app.coffee b/lib/actions/app.coffee index 5a288057..3c3ef6bc 100644 --- a/lib/actions/app.coffee +++ b/lib/actions/app.coffee @@ -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) -> diff --git a/lib/app.coffee b/lib/app.coffee index 7508093e..50c1d6e7 100644 --- a/lib/app.coffee +++ b/lib/app.coffee @@ -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')