This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Description
What version of dep are you using (dep version)?
Current head (1208520).
What dep command did you run?
dep status -detail -v -out my-output.txt
What did you expect to see?
When dep status is given the -out flag, it writes its output to the specified file instead of stdout. I expected the same to be true if a non-fatal error occurs when fetching remote repos.
What did you see instead?
The output data was written to stdout.
Looking at
|
if cmd.outFilePath == "" { |
|
// Print the status output |
|
ctx.Out.Print(buf.String()) |
|
} else { |
|
file, err := os.Create(cmd.outFilePath) |
|
if err != nil { |
|
return fmt.Errorf("error creating output file: %v", err) |
|
} |
|
|
|
defer file.Close() |
|
if _, err := io.Copy(file, bytes.NewReader(buf.Bytes())); err != nil { |
|
return fmt.Errorf("error writing output file: %v", err) |
|
} |
|
} |
, this is because the
errFailedUpdate check happens in a separate branch that does not inspect
cmd.outFilePath.