Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Feb 6, 2018
1 parent 3ab9a3f commit dd313c1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 16 deletions.
3 changes: 1 addition & 2 deletions lib/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ module.exports = function(archive, files, options) {
files = u.files(files);
try {
if (options.path) {
var command = u.path(options);
command += ' a "' + archive + '" ' + files;
var command = u.path(options) + ' a "' + archive + '" ' + files;
options = {};
} else var command = '7za a "' + archive + '" ' + files;
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ module.exports = function(archive, files, options) {
// Create a string that can be parsed by `run`.
try {
if (options.path) {
var command = u.path(options);
command += ' d "' + archive + '" ' + files;
var command = u.path(options) + ' d "' + archive + '" ' + files;
options = {};
} else var command = '7za d "' + archive + '" ' + files;
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ module.exports = function(archive, dest, options) {
// Create a string that can be parsed by `run`.
try {
if (options.path) {
var command = u.path(options);
command += ' e "' + archive + '" -o"' + dest + '" ';
var command = u.path(options) + ' e "' + archive + '" -o"' + dest + '" ';
options = {};
} else var command = '7za e "' + archive + '" -o"' + dest + '" ';
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/extractFull.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ module.exports = function(archive, dest, options) {
// Create a string that can be parsed by `run`.
try {
if (options.path) {
var command = u.path(options);
command += ' x "' + archive + '" -o"' + dest + '" ';
var command = u.path(options) + ' x "' + archive + '" -o"' + dest + '" ';
options = {};
} else var command = '7za x "' + archive + '" -o"' + dest + '" ';
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ module.exports = function(archive, options) {
// Create a string that can be parsed by `run`.
try {
if (options.path) {
var command = u.path(options);
command += ' l "' + archive + '" ';
var command = u.path(options) + ' l "' + archive + '" ';
options = {};
} else var command = '7za l "' + archive + '" ';
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ module.exports = function(archive, options) {
// Create a string that can be parsed by `run`.
try {
if (options.path) {
var command = u.path(options);
command += ' t "' + archive + '"';
var command = u.path(options) + ' t "' + archive + '"';
options = {};
} else var command = '7za t "' + archive + '"';
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions lib/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ module.exports = function(archive, files, options) {
// Create a string that can be parsed by `run`.
try {
if (options.path) {
var command = u.path(options);
command += ' u "' + archive + '" "' + files + '"';
var command = u.path(options) + ' u "' + archive + '" "' + files + '"';
options = {};
} else var command = '7za u "' + archive + '" "' + files + '"';
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/add.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Method: `Zip.add`', function() {
});
});

it('should accept a path', function (done) {
it('should accept a path', function(done) {
add('.tmp/test/add.zip', '*.md', {
path: _7zcmd
})
Expand Down
2 changes: 1 addition & 1 deletion util/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var path = require('path');
module.exports = function (options) {

var macversion = (process.platform == "darwin") ? require('macos-release').version : '';
var binarypath = path.join(__dirname, '..','binaries', (macversion=='') ? process.platform : process.platform, macversion);
var binarypath = path.resolve(__dirname, '..','binaries', (macversion=='') ? process.platform : process.platform, macversion);

// Create a string that can be parsed by `run`.
try {
Expand Down

0 comments on commit dd313c1

Please sign in to comment.