Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Clean up the logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddalozzo committed Aug 15, 2013
1 parent 2fca7cb commit 8c1cc75
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tasks/rsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ module.exports = function (grunt) {
'use strict';

function rsyncCallback(error, stdout, stderr) {
grunt.log.writeln('stdout: ' + stdout);
grunt.log.writeln('stderr: ' + stderr);

grunt.log.writeln('err: ' + error);

grunt.verbose.write(stdout);
if (error) {
//done(false);
grunt.verbose.write(stderr)
grunt.fail.fatal(error);
}else{
grunt.log.ok('Files transferred successfully.');
}
}

Expand All @@ -33,8 +32,8 @@ module.exports = function (grunt) {
cmd.push(user + '@' + host + ':' + remoteBase + '/' + target); // TODO: normalize
cmd = cmd.join(' ');

grunt.log.writeln( 'executing: ' + cmd );
grunt.log.write( 'starting transfer... ' );
grunt.log.writeln( 'Executing: ' + cmd );
grunt.log.writeln( 'Starting transfer... ' );

exec(cmd, rsyncCallback);
grunt.log.ok();
Expand Down

0 comments on commit 8c1cc75

Please sign in to comment.