Prevent red text & Warning when stderr is utilized by CLI tool


We are using a CLI tool ( mongorestore.exe ) to restore a backup of scrubbed prod data to a non-prod environment. Unfortunately, this tool is writing console messages to stderr. This is causing what i believe octopus deploy to show the console messages as red text and flagging the successful build with a warning that says

“The task completed succesfully but warnings or errors were reported in the logs”

Can i force my powershell script to still output the console messages produced by this tool but prevent octopus from flagging the warning and showing the console messages in red?


Hi @michael.fyffe.freelance!

You can use Output redirection to redirect the output of stderr to std out, simply call your command with 2>&1 at the end.

I hope this helps!

Hey Justin,

Awesome i actually just found this and am giving it a shot now! I’ll post back on what the results were

Hey Justin,

Strangely enough when i redirected stderr to stdout the tenctacle just hung forever :S