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

Empty files are missing #1154

Open
Wohllebe-dotSource opened this issue May 30, 2022 · 1 comment
Open

Empty files are missing #1154

Wohllebe-dotSource opened this issue May 30, 2022 · 1 comment

Comments

@Wohllebe-dotSource
Copy link

Wohllebe-dotSource commented May 30, 2022

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:

if !f.Mode().IsRegular() || f.Size() == 0 {
return nil
}

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

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants