Skip to content

try to address issues with redirecting stdout to file#2404

Merged
rv-jenkins merged 7 commits intomasterfrom
tty
Jan 21, 2022
Merged

try to address issues with redirecting stdout to file#2404
rv-jenkins merged 7 commits intomasterfrom
tty

Conversation

@dwightguth
Copy link
Copy Markdown
Contributor

@dwightguth dwightguth commented Jan 20, 2022

Previously there was a bug where if the user did not specify --output-file to krun, kore-print, or kparse, but nonetheless redirected the output of the command to a file, the file would be truncated even if the user told the shell to append output. This happened because of a particular nuance of how we had been implementing the --output-file flag. This PR should solve this issue by means of adding some extra logic to those scripts. We also take the opportunity to refactor slightly and move some common code into a common script stored in the lib directory that gets sourced by multiple bash scripts.

Fixes #2403

@dwightguth dwightguth marked this pull request as ready for review January 20, 2022 20:38
@dwightguth dwightguth requested a review from ehildenb January 20, 2022 20:38
Comment thread k-distribution/src/main/scripts/lib/k.sh Outdated
@ehildenb
Copy link
Copy Markdown
Member

I've tested this against the TEAL semantics and confirmed that it fixes the initial problem. I'd still like to see tests for it (by having a custom KPARSE=./kparseTwice script as Dwight and I discussed on Slack, but if the extra documentation is enough for @radumereuta then feel free to get merged.

@dwightguth dwightguth removed their assignment Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [kparse] - Weird truncation behavior with stdout

4 participants