Browse files

[api] added defaults to prompts within `jitsu env`

  • Loading branch information...
1 parent b01e687 commit 6ba79b9676e7d30d3180953ccd545ca56864efe3 @blakmatrix blakmatrix committed Dec 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/jitsu/commands/env.js
View
6 lib/jitsu/commands/env.js
@@ -249,7 +249,7 @@ env.clear = function (appName, callback) {
}
jitsu.log.warn('All environment variables for ' + app.name.magenta + ' will be deleted.');
- jitsu.prompt.confirm('yes/no', function (err, result) {
+ jitsu.prompt.confirm('yes/no', { default: 'yes'}, function (err, result) {
return (err || !result)
? callback(err)
: jitsu.apps.update(app.name, { env: {} }, callback);
@@ -285,7 +285,7 @@ env.save = function (appName, file, callback) {
jitsu.log.warn('This may contain sensitive data. Be sure not to commit this'
+ ' file to some public repository. YOU HAVE BEEN WARNED.');
jitsu.log.info('Is this okay?');
- jitsu.prompt.confirm('yes/no', function (err, result) {
+ jitsu.prompt.confirm('yes/no', { default: 'yes'}, function (err, result) {
if (result) {
fs.writeFile(file, JSON.stringify(app.env, null, 2), function (err) {
if (!err) {
@@ -365,7 +365,7 @@ env.load = function (appName, file, callback) {
jitsu.inspect.putObject(env);
jitsu.log.warn('YOU CAN LOSE ENVIRONMENT VARIABLES IF YOU ARE NOT CAREFUL.');
jitsu.log.info('Is this okay?');
- jitsu.prompt.confirm('yes/no', function (err, result) {
+ jitsu.prompt.confirm('yes/no', { default: 'yes'}, function (err, result) {
if (result) {
jitsu.apps.update(app.name, { env: env }, callback);
} else {

0 comments on commit 6ba79b9

Please sign in to comment.