Skip to content

Commit

Permalink
[Refactor] use npm-which to locate tape binary
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 22, 2022
1 parent d4559ca commit 0a9bd16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
var faucet = require('../');
var minimist = require('minimist');
var defined = require('defined');
var tapeCmd = require.resolve('tape/bin/tape');
var which = require('npm-which')(process.cwd());
var tapeCmd = which.sync('tape');

var spawn = require('child_process').spawn;
var fs = require('fs');
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"faucet": "bin/cmd.js"
},
"dependencies": {
"through2": "~0.2.3",
"tap-parser": "~0.4.0",
"defined": "^0.0.0",
"duplexer": "~0.1.1",
"minimist": "^0.0.5",
"npm-which": "^3.0.1",
"sprintf": "~0.1.3",
"tap-parser": "~0.4.0",
"tape": "~2.3.2",
"minimist": "0.0.5",
"defined": "0.0.0"
"through2": "~0.2.3"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 0a9bd16

Please sign in to comment.