Open tigerinus opened 1 year ago
I'm sorry, I don't understand what you expect here.
RunWithStatus
is responsible for the lifetime of the Writer it's using, i.e it creates one, and MUST ensure it get stopped before returning. What would you suggest here? (feel free to open a Pull Request so this is easier to understand)
@ndeloof thanks for looking into this.
I am writing a tool, which you can think of a frontend wrapper of docker compose. Part of the feature is to show the progress of image pulling when calling Pull, Create or Up methods of compose service.
I was expecting providing my own writer
so I can capture something. However due to this bug (or design), it doesn't respect the custom writer and returns nothing.
@ndeloof - please see my PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as not stale anymore due to the recent activity.
This issue has been automatically marked as not stale anymore due to the recent activity.
Description
Trying to write a code in Go to interact with docker compose. The interaction includes reading messages from a custom writer associated with
ctx
viaprogress.WithContextWriter(ctx, writer)
Steps To Reproduce
See code at https://go.dev/play/p/xBTIGKO3pzR
Notice the lines
In the https://github.com/docker/compose/blob/v2/pkg/progress/writer.go, the custom writer is overriden:
Compose Version
Docker Environment
Anything else?
No response