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

Moved cat "header" to stderr for easier piping #21

Merged

Conversation

juan-riveros
Copy link
Contributor

Fixes Issue #20 by moving the cat "header" to stderr instead of stdout to allow for piping.

Feel free to reject this if you think that a --quiet flag might be a better option.

@manojkarthick
Copy link
Owner

Thanks @juan-riveros - this looks great! I think it's okay to move the header to stderr. The tests seem to be failing though, would you be able to take a look?

* Changed `validate_cat_csv` since it's predicate assumed that the output would have the extra spacing caused by the header. (ie. removed two empty lines it checked for)
* Changed `validate_cat_directory` from checking for the filenames on standard out to checking for filenames on stderr.
@juan-riveros
Copy link
Contributor Author

There that should do it. Had to change two tests since they assumed that the header existed in stdout. One assumed the output would be surrounded by newlines so just removed the newlines from the predicate and the other checked for filenames in stdout so changed it checking against stderr instead.

@manojkarthick
Copy link
Owner

Awesome. Thanks a lot for contributing!

@manojkarthick manojkarthick merged commit 62d6438 into manojkarthick:master Dec 8, 2021
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.

None yet

2 participants