aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-10-05 15:20:28 +0200
committerIgor Pashev <pashev.igor@gmail.com>2019-10-05 15:20:28 +0200
commit443c70d90a5cd0e958a653ed8df3352c9aac06d9 (patch)
tree7932765f372871b61f989d3584e924a920954dd8 /cmd
parent71301aa4ea7e23671759bdc39397baadc7271996 (diff)
downloadnpm4nix-443c70d90a5cd0e958a653ed8df3352c9aac06d9.tar.gz
Extract only top-level package.json
Diffstat (limited to 'cmd')
-rwxr-xr-xcmd/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/main.js b/cmd/main.js
index b71bbed..43059ad 100755
--- a/cmd/main.js
+++ b/cmd/main.js
@@ -97,7 +97,7 @@ function processArchive(url) {
try {
exec(`curl -LsSf -o '${file}' '${url}'`);
sha256 = getSHA256(file);
- pkg = JSON.parse(exec(`tar -xOf '${file}' --wildcards '*/package.json'`));
+ pkg = JSON.parse(exec(`tar -xOf '${file}' --wildcards --no-wildcards-match-slash '*/package.json'`));
} finally {
rmTree(dir);
}