Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
and added more contributors <3
  • Loading branch information
q2s2t committed Nov 12, 2016
1 parent ab0ea6e commit 47f99a6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Changelog
### `v0.4.2` **CURRENT**

* Fix: `run` returns useful error from stderr (#31)
* Doc: It's better with the correct verbs (commit 7c0355beea59c42e040d0e776ff945be94705a74)
* Dependencies: Switch to cross-spawn and update other dependencies (#29)

### `v0.4.1` 2016-01-13

Expand Down
6 changes: 3 additions & 3 deletions lib/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var u = {
files : require('../util/files'),
run : require('../util/run'),
switches: require('../util/switches'),
path : require('../util/path'),

This comment has been minimized.

Copy link
@lbeschastny

lbeschastny Feb 9, 2017

Contributor

@quentinrossetti FYI, this file is missing from the repo.

};

/**
Expand All @@ -22,9 +23,8 @@ module.exports = function (archive, files, options) {

// Convert array of files into a string if needed.
files = u.files(files);

// Create a string that can be parsed by `run`.
var command = '7z a "' + archive + '" ' + files;

var command = u.path(options) + ' a "' + archive + '" ' + files;

// Start the command
u.run(command, options)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"HelloGravity",
"sketchpunk",
"Dannii Willis <[email protected]>",
"toantk911"
"toantk911",
"redx25 <[email protected]>"
],
"license": "ISC",
"bugs": {
Expand Down
11 changes: 11 additions & 0 deletions test/lib/add.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*global describe, it */
'use strict';
var expect = require('chai').expect;
var exec = require('child_process').execSync;
var add = require('../../lib/add');

describe('Method: `Zip.add`', function () {
Expand Down Expand Up @@ -34,5 +35,15 @@ describe('Method: `Zip.add`', function () {
done();
});
});

it('should accept a path', function (done) {
add('.tmp/test/add.zip', '*.md', {
path: '/usr/local/bin/7z'
})
.progress(function (entries) {
expect(entries.length).to.be.at.least(1);
done();
});
});

});

0 comments on commit 47f99a6

Please sign in to comment.