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

Prepend 'exec 2>&1' to custom_script to untangle output #32

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

erikmd
Copy link
Member

@erikmd erikmd commented Nov 26, 2020

  • This patch workarounds GitHub Actions unflushed std(out/err) output.

* This patch workarounds GitHub Actions unflushed std(out/err) output.
Copy link
Member

@Zimmi48 Zimmi48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard for me to review because I didn't know about the issue and I don't understand the fix. But I trust you on this.

@erikmd
Copy link
Member Author

erikmd commented Nov 26, 2020

OK, so FTR: the fact is that the lines automatically added by set -x are sent to stderr, while the main output is sent to stdout, and the issue was that GHA does not seem to flush printing to these two different channels, resulting (before this PR) is a distracting un-sync.

For example, beforehand:
https://github.com/erikmd/docker-coq-github-action-demo/runs/1456333460?check_suite_focus=true#step:4:188

some value
+ (script @ line 4) $ printf '%s\n' 'some value'

henceforth:
https://github.com/erikmd/docker-coq-github-action-demo/runs/1456454613?check_suite_focus=true#step:4:188

+ (script @ line 4) $ printf '%s\n' 'some value'
some value

@Zimmi48
Copy link
Member

Zimmi48 commented Nov 26, 2020

OK, so basically, you redirect them to the same channel to ensure they are printed in order. Sounds good to me. However, this might also be worth to open a feedback ticket with GitHub about this: https://support.github.com/contact/feedback

@erikmd
Copy link
Member Author

erikmd commented Nov 26, 2020

this might also be worth to open a feedback ticket with GitHub about this: https://support.github.com/contact/feedback

Done.

@erikmd erikmd merged commit 258c0be into master Nov 26, 2020
@erikmd erikmd deleted the untangle-output branch November 26, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants