mirror of
https://github.com/fiatjaf/nak.git
synced 2026-10-05 15:18:23 +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 outputPath == "-" {
|
||||||
if _, err = os.Stdout.Write(obj.Data); err != nil {
|
if _, err = os.Stdout.Write(obj.Data); err != nil {
|
||||||
log("\nprinted object %s to stdout\n", color.CyanString(obj.Hash))
|
|
||||||
return err
|
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 {
|
if err := os.WriteFile(outputPath, obj.Data, 0644); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user