Changeset 516 for Dev/trunk/node_modules/grunt-exec/tasks/exec.js
- Timestamp:
- 03/14/14 12:36:58 (11 years ago)
- Location:
- Dev/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk
- Property svn:ignore
-
old new 1 1 build 2 quod-erat.git
-
- Property svn:ignore
-
Dev/trunk/node_modules/grunt-exec/tasks/exec.js
r484 r516 18 18 , stderr = data.stderr !== undefined ? data.stderr : true 19 19 , callback = _.isFunction(data.callback) ? data.callback : function() {} 20 , exitCode = data.exitCode|| 020 , exitCodes = data.exitCode || data.exitCodes || 0 21 21 , command 22 22 , childProcess … … 24 24 , done = this.async(); 25 25 26 // https://github.com/jharding/grunt-exec/pull/30 27 exitCodes = _.isArray(exitCodes) ? exitCodes : [exitCodes]; 28 26 29 // allow for command to be specified in either 27 // 'command' or 'cmd' property 28 command = data.command || data.cmd ;30 // 'command' or 'cmd' property, or as a string. 31 command = data.command || data.cmd || (_.isString(data) && data); 29 32 30 33 data.cwd && (execOptions.cwd = data.cwd); … … 46 49 47 50 verbose.subhead(command); 48 verbose.writeln(f('Expecting exit code % d', exitCode));51 verbose.writeln(f('Expecting exit code %s', exitCodes.join(' or '))); 49 52 50 53 childProcess = cp.exec(command, execOptions, callback); … … 54 57 55 58 childProcess.on('exit', function(code) { 56 if ( code !== exitCode) {59 if (exitCodes.indexOf(code) < 0) { 57 60 log.error(f('Exited with code: %d.', code)); 58 61 return done(false);
Note: See TracChangeset
for help on using the changeset viewer.