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

CLI outPath support #92

Merged
merged 2 commits into from
Feb 6, 2024
Merged

CLI outPath support #92

merged 2 commits into from
Feb 6, 2024

Conversation

aabounegm
Copy link
Collaborator

@aabounegm aabounegm commented Feb 4, 2024

Checks if outPath (--output or -o) parameter is passed, and if so, uses it for the output instead of stdout.


PR-Codex overview

This PR focuses on improving the logging functionality of the eo-phi-normalizer application.

Detailed summary

  • Added import for System.IO module.
  • Created a new handle variable for file output.
  • Modified putStrLn calls to logStrLn for logging to file.
  • Added hClose to close the file handle after logging is done.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@aabounegm
Copy link
Collaborator Author

aabounegm commented Feb 4, 2024

In retrospect, I'm not sure why I didn't use whatever the Haskell equivalent of freopen is (Edit: I believe the equivalent would be hDuplicateTo.

@fizruk
Copy link
Collaborator

fizruk commented Feb 5, 2024

Please, update documentation in the README.

@fizruk fizruk merged commit 65f4db2 into master Feb 6, 2024
5 checks passed
@fizruk fizruk deleted the CLI-output-path branch February 6, 2024 06:17
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