apache / openwhisk-wskdeploy

Apache OpenWhisk utility for deploying and managing OpenWhisk projects and packages
https://openwhisk.apache.org/
Apache License 2.0
77 stars 74 forks source link

Empty files are missing #1154

Open Wohllebe-dotSource opened 2 years ago

Wohllebe-dotSource commented 2 years ago

Hi,

I'm using wskdeploy to deploy a nodejs project. Some of my dependencies under node_modules contains empty files, that are currently ignored by wskdeploy: https://github.com/apache/openwhisk-wskdeploy/blob/d653592d8b8e8b7e64f228049bfa2f74db07a1e1/utils/zip.go#L79-L81

Unfortunately, the missing files currently break my application.

Is the empty check really needed? How can I ensure that empty files will be uploaded?

My workaround:

find . -type f -empty -name '*.js' -exec bash -c "echo '//' > \"{}\"" \;
mrutkows commented 2 years ago

@Wohllebe-dotSource Just curious... why does your code need to include zero-length files? It would be good to understand the use case before any code changes are made. Also, feel free to submit a PR for review/discussion and try the removal of the zero size check locally to verify your assumption.