Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[minor] make jitsu scriptable (overrides for prompts, and exit with n…

…on zero on error)
  • Loading branch information...
commit da56de6f4d9ecd82368bb90fdf4f51fa57895ec9 1 parent f1b1541
@dominictarr dominictarr authored
Showing with 10 additions and 4 deletions.
  1. +8 −3 bin/jitsu
  2. +1 −0  lib/jitsu.js
  3. +1 −1  package.json
View
11 bin/jitsu
@@ -6,13 +6,18 @@ var eyes = require('eyes'),
argv = require('optimist').argv,
jitsu = require('../lib/jitsu');
-
jitsu.start(argv, function (err) {
if (!err) {
winston.info('Nodejitsu'.grey + ' ok'.green.bold);
}
-
process.stdout.on('drain', function () {
- process.exit(0);
+ process.exit(err ? 1 : 0);
})
+ function onexit (code,status) {
+ if(err) {
+ process.removeListener('exit',onexit)
+ process.exit(1)
+ }
+ }
+ process.on('exit', onexit )
});
View
1  lib/jitsu.js
@@ -40,6 +40,7 @@ jitsu.api.Snapshots = require('./jitsu/api/snapshots').Snapshots;
jitsu.api.Users = require('./jitsu/api/users').Users;
jitsu.prompt = require('prompt');
jitsu.prompt.properties = require('./jitsu/properties').properties;
+jitsu.prompt.override = require('optimist').argv
jitsu.config = require('./jitsu/config');
jitsu.commands = require('./jitsu/commands');
View
2  package.json
@@ -23,7 +23,7 @@
"npm": "1.0.x & > 1.0.10",
"optimist": "0.2.x",
"pkginfo": "0.2.x",
- "prompt": "0.1.x >=0.1.5",
+ "prompt": "https://github.com/dominictarr/node-prompt/tarball/v0.1.7",
"request": "1.9.x",
"require-analyzer": "0.2.x",
"winston": "0.3.x",
Please sign in to comment.
Something went wrong with that request. Please try again.