Skip to content
This repository has been archived by the owner on Mar 18, 2018. It is now read-only.

Commit

Permalink
Format ignores using quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Jan 16, 2015
1 parent 404bbaf commit 7064423
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Connection.prototype.copy = function (src, dest, options, cb) {

function formatExcludes(excludes) {
return excludes.reduce(function (prev, current) {
return prev.concat(['--exclude', current]);
return prev.concat(['--exclude', '"' + current + '"']);
}, []);
}

Expand Down
2 changes: 1 addition & 1 deletion test/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('SSH Connection', function () {
it('should accept "ignores" option', function (done) {
connection.copy('/src/dir', '/dest/dir', {ignores: ['a', 'b']}, done);

expect(childProcess.exec).to.be.calledWith('rsync --exclude a --exclude b -az -e ' +
expect(childProcess.exec).to.be.calledWith('rsync --exclude "a" --exclude "b" -az -e ' +
'"ssh " /src/dir user@host:/dest/dir');
});

Expand Down

0 comments on commit 7064423

Please sign in to comment.