mirror of
https://github.com/fiatjaf/nak.git
synced 2026-08-12 17:03:26 +00:00
git: don't fall through to writing a literal '-' file after download already printed the object to stdout.
This commit is contained in:
@@ -635,9 +635,10 @@ aside from those, there is also:
|
||||
|
||||
if outputPath == "-" {
|
||||
if _, err = os.Stdout.Write(obj.Data); err != nil {
|
||||
log("\nprinted object %s to stdout\n", color.CyanString(obj.Hash))
|
||||
return err
|
||||
}
|
||||
log("\nprinted object %s to stdout\n", color.CyanString(obj.Hash))
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := os.WriteFile(outputPath, obj.Data, 0644); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user