Skip to content

Conversation

@abetaev
Copy link
Contributor

@abetaev abetaev commented Apr 25, 2019

Hi,

Issue
If prepack script is defined npm seems to output more than expected in original code.

Description of changes:
npm pack outputs filename as last line of stdout, while in code the whole its output was assigned to tarfile_name var. This fix makes it right.

Thanks,
Alex

p.s. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sriram-mv
Copy link
Contributor

Does this change work in either cases? if prepack is defined or not defined?

@mhart
Copy link

mhart commented Jan 17, 2020

Lol, just ran into this – and fixed with it the same fix. Was just about to submit a PR.

It also happens if you have a prepare script defined.

This fix is the right fix – npm can output a bunch of stuff to stdout if it runs user scripts during the pack process, and aws-lambda-builders really messes up the tar file name in that case (and errors).

@sriram-mv sriram-mv self-requested a review January 23, 2020 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants