Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never exclude package.json, even when specified in excludeGlobs. #141

Merged

Conversation

droustchev
Copy link
Contributor

@droustchev droustchev commented Aug 24, 2016

If someone specifies *.json or even package.json via the excludeGlobs, the npm install step in the tmp folder will fail due to ENOPACKAGEJSON. This PR modifies the rsync command to always include the package.json, similar to how certain files are always excluded.

@droustchev droustchev force-pushed the fix-glob-exclude-no-packagejson branch from fd8e084 to ff06783 Compare August 24, 2016 19:58
@DeviaVir
Copy link
Collaborator

DeviaVir commented Sep 2, 2016

This behaviour should also keep --prebuiltDirectory in mind (https://github.com/motdotla/node-lambda#prebuilt-packages)

i.e. only exclude package.json from excludes when --prebuiltDirectory is not set

@droustchev
Copy link
Contributor Author

droustchev commented Sep 2, 2016

I'll try update the PR! Didn't use --prebuiltDirectory, hence I didn't notice my change breaking existing behaviour.

@droustchev
Copy link
Contributor Author

I added a commit which addresses the concern around --prebuiltDirectory, i.e. if said flag is set, rsync will be called without the --include package.json.
Presumably, a prebuilt directory shouldn't have a package.json though, or? Let me know if more changes are required.

@DeviaVir
Copy link
Collaborator

DeviaVir commented Sep 6, 2016

Perfect! Thanks for your contribution, I'll include it in the next release.

@DeviaVir DeviaVir merged commit 447512e into motdotla:master Sep 6, 2016
This was referenced Sep 6, 2016
@droustchev droustchev deleted the fix-glob-exclude-no-packagejson branch November 3, 2016 01:39
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.

2 participants