Suppress output #372
Answered
by
natefinch
sheldonhull
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Are you sure you don't have MAGEFILE_VERBOSE set? sh.Run shouldn't output to stdout without that or -v. |
Beta Was this translation helpful? Give feedback.
3 replies
-
You can use os/exec.Command :)
…On Sat, Sep 25, 2021, 8:17 PM sheldonhull ***@***.***> wrote:
Got ya. That's probably what's snagging me. I'm betting go outputs to
stderr for this.
Not a big deal, but was hoping to have a simple way to suppress the normal
output unless an error occurred.
Without capturing and parsing string of the output, do you know of any
simple way to suppress the output from go install/go mod tidy commands
unless an error occurs? I couldn't find any "quiet" flag and guessing there
isn't any.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYJZSHL3EXKPQWLNEIVDLTUDZRBNANCNFSM5EW3VBOA>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sheldonhull
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm probably doing something wrong, but if I have mage run:
I get stdout. I've tried other commands in the mage sh package but all output to stdout even without the
-v
flag it seems.Do you have any example of writing a custom multiwriter with Mage so I can redirect stdout and only output on error?
Trying to trim the initialization output for local work when no error is being detected if I can.
Beta Was this translation helpful? Give feedback.
All reactions