Open armenzg opened 3 years ago
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
In https://github.com/getsentry/sentry/pull/24104 I noticed that the code that
sentry-cli bash-hook
generates uses: > "$_SENTRY_LOG_FILE"
to redirect output. For some reason I fail to understand, this does not write all the output before callingsentry-cli bash-hook --send-event
. I had to write a_wait_for_file
function to wait for the file not to have size 0.NOTE: I dump the output of
sentry-cli bash-hook
because I did not want to trap EXIT since it would affect the behaviour ofdirenv
. Perhaps I could have combined this with "untrapping" after callingeval $(sentry-cli bash-hook)
.I have created a test case below. I have also noticed that using
exec
does the redirection without the need to wait for the log to be written. See this other PR.FYI
sentry-cli bash-hook --send-event
with an empty logfile does not emit any warnings.I will be away until Monday, thus, it will take me a while to reply.