Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
cli: use given stdout as stderr by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mitake committed May 27, 2016
1 parent d56ed94 commit 4358e9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nmz/cli/inspectors/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,16 @@ func (cmd procCmd) Run(args []string) int {
return 1
}
cmd.Stdout = f

if _procFlags.Stderr == "" {
cmd.Stderr = f
}
}

if _procFlags.Stderr == "" {
cmd.Stderr = os.Stderr
if cmd.Stderr == nil {
cmd.Stderr = os.Stderr
}
} else {
f, err := os.OpenFile(_procFlags.Stderr, os.O_WRONLY|os.O_CREATE, 0622)
if err != nil {
Expand Down

0 comments on commit 4358e9d

Please sign in to comment.