Skip to content

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

Merged
DeviaVir merged 2 commits into
motdotla:masterfrom
droustchev:fix-glob-exclude-no-packagejson
Sep 6, 2016
Merged

Never exclude package.json, even when specified in excludeGlobs.#141
DeviaVir merged 2 commits into
motdotla:masterfrom
droustchev:fix-glob-exclude-no-packagejson

Conversation

@droustchev

@droustchev droustchev commented Aug 24, 2016

Copy link
Copy Markdown
Contributor

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

DeviaVir commented Sep 2, 2016

Copy link
Copy Markdown
Collaborator

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

droustchev commented Sep 2, 2016

Copy link
Copy Markdown
Contributor Author

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

@droustchev

Copy link
Copy Markdown
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

DeviaVir commented Sep 6, 2016

Copy link
Copy Markdown
Collaborator

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