~rjarry/aerc#117: 
'script: completed with status 0' message is not consistent

I'm facing a very strange issue: for certain IMAP providers (like Gmail, and I don't know about other backends) the status line message script: completed with status 0 doesn't always show after running a script via :pipe -b.

First, it wasn't like this before but was introduced somwhere between these commits (I build aerc from time to time and can't reproduce this nuance prior to v.0.12.0-74-g8cd4770f329c, while it does appear in the next build, v.0.12.0-88-ge804fac59f41):

e804fac (2022-10-07) mk: exclude govulncheck from lint (Robin Jarry)
049c723 (2022-10-06) invalidatable: always mark ui as dirty OnInvalidate (Tim Culverhouse)
a49caf9 (2022-10-06) terminal: use Invalidate and QueueRedraw (Tim Culverhouse)
725fe07 (2022-10-06) render: clean up render code (Tim Culverhouse)
bb12491 (2022-10-06) aerc: use single event loop (Tim Culverhouse)
d847073 (2022-10-06) events: introduce AercMsg and QueueRedraw (Tim Culverhouse)
c6561d3 (2022-10-05) forward,recall: fix charsets in part attachment (Koni Marti)
d2f4f12 (2022-10-04) compose: avoid double lock in MouseEvent (Tim Culverhouse)
d99b608 (2022-10-04) imap: fix flags update (Koni Marti)
d3b62dd (2022-10-03) view: add peek flag and propagate (Koni Marti)
e4d418e (2022-10-03) viewer: option to not mark message as seen (Koni Marti)
4c37117 (2022-09-27) worker: use container/list as job queue (Tim Culverhouse)
1c2dd4c (2022-10-03) bindings: properly check for exKey keystrokes (Tim Culverhouse)
150aa0f (2022-10-03) maildir: hide invalid folders (Julian Pidancet)
8cd4770 (2022-09-29) msgstore: fix data race on access to store.needsFlags (Tim Culverhouse)

Second, as I said, it doesn't affect all the IMAP providers (I can reproduce it on Gmail but can't reproduce on some others).

And third, it doesn't happen for all the scripts but just for some. Example:

If I pipe a message to this script:

#!/usr/bin/env bash

Q=$(head -n 10 | grep .)
W=$(echo $Q | grep q)

The message script: completed with status 0 will appear. However, if I add another line, it won't:

#!/usr/bin/env bash

Q=$(head -n 10 | grep .)
W=$(echo $Q | grep q)
E=$(echo $W | grep w)

Any thoughts? :)

Status
REPORTED
Submitter
~john1doe
Assigned to
No-one
Submitted
2 months ago
Updated
2 months ago
Labels
needs-reproducer

~john1doe 2 months ago

@rjarry You mean, you can't reproduce it with Gmail and the provided scripts?

~rjarry 2 months ago

I did not try it. I will remove the label if I can reproduce. It looks like a race condition.

Register here or Log in to comment, or comment via email.