Skip to content

Commit

Permalink
Merge pull request #173 from mindstorms6/master
Browse files Browse the repository at this point in the history
Make the parsing of npm pack output more robust
  • Loading branch information
mindstorms6 authored Aug 13, 2018
2 parents a343062 + 957db1b commit 46f1771
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/jsii-pacmak/bin/jsii-pacmak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ async function npmPack(packageDir: string, tmpdir: string): Promise<string> {
args.push('--loglevel=verbose');
}
const out = await shell('npm', args, { cwd: tmpdir });
return path.resolve(tmpdir, out.trim());
// Take only the last line of npm pack which should contain the
// tarball name. otherwise, there can be a lot of extra noise there
// from scripts that emit to STDOUT.
const lines = out.trim().split(os.EOL);
return path.resolve(tmpdir, lines[lines.length - 1].trim());
}

async function updateNpmIgnore(packageDir: string, excludeOutdir: string | undefined) {
Expand Down

0 comments on commit 46f1771

Please sign in to comment.