You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PrefixPrinter does not use changed defaultWriter #751
The prefix printers included in pterm are initialized to use pterm.defaultWriter as their writer.
When calling pterm.SetDefaultOutput(writer) the prefix printers will still use the original default, so we need to call p.WithWriter(writer) to use a different writer.
Reading the comment of the pterm.SetDefaultOutput function I would assume the prefix printers would also use the updated default.
I have a fix for this in a local branch along with a test case, and can send a pull request if you are interested.
Activity
christeredvartsen commentedon Nov 11, 2025
Similar issue: #701
fix(prefix): PrefixPrinter now uses updated defaultWriter (#752)