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

spit-csv: write header, even if there are no rows #50

Open
ghost opened this issue Mar 1, 2017 · 1 comment
Open

spit-csv: write header, even if there are no rows #50

ghost opened this issue Mar 1, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 1, 2017

Hi,
I don't know if the current behaviour is the expected behaviour and that my expectation is wrong, or if this is a bug :) , but when I use spit-csv with a custom header (via :header ) and :prepend-header true, I would expect that the written file always gets a header, even if there are no rows.
The current behaviour is that if there are no rows, no header is written even if a :header is given and :prepend-header is true

I can write a workaround in my code, but I wonder if this should be fixed in spit-csv instead?

@metasoarous
Copy link
Owner

Good find! Thanks for reporting. That definitely violates my assumptions about what should happen. There's some new work I need to release that might fix this. If not though, well queue it up for work. Thanks!

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

1 participant