Ignore:
Timestamp:
03/14/14 12:36:58 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Enable deployment with Grunt.

Location:
Dev/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11build
        2 quod-erat.git
  • Dev/trunk/node_modules/grunt-exec/tasks/exec.js

    r484 r516  
    1818      , stderr = data.stderr !== undefined ? data.stderr : true
    1919      , callback = _.isFunction(data.callback) ? data.callback : function() {}
    20       , exitCode = data.exitCode || 0
     20      , exitCodes = data.exitCode || data.exitCodes || 0
    2121      , command
    2222      , childProcess
     
    2424      , done = this.async();
    2525
     26    // https://github.com/jharding/grunt-exec/pull/30
     27    exitCodes = _.isArray(exitCodes) ? exitCodes : [exitCodes];
     28
    2629    // 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);
    2932
    3033    data.cwd && (execOptions.cwd = data.cwd);
     
    4649
    4750    verbose.subhead(command);
    48     verbose.writeln(f('Expecting exit code %d', exitCode));
     51    verbose.writeln(f('Expecting exit code %s', exitCodes.join(' or ')));
    4952
    5053    childProcess = cp.exec(command, execOptions, callback);
     
    5457
    5558    childProcess.on('exit', function(code) {
    56       if (code !== exitCode) {
     59      if (exitCodes.indexOf(code) < 0) {
    5760        log.error(f('Exited with code: %d.', code));
    5861        return done(false);
Note: See TracChangeset for help on using the changeset viewer.