Преглед изворни кода

Use o.Writer if not nil to write output (#330)

Use o.Writer if not nil to write output
Alexey Sudachén пре 7 година
родитељ
комит
7b40afb9bb
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      internal/driver/driver.go

+ 1
- 1
internal/driver/driver.go Прегледај датотеку

@@ -138,7 +138,7 @@ func generateReport(p *profile.Profile, cmd []string, vars variables, o *plugin.
138 138
 
139 139
 	// Output to specified file.
140 140
 	o.UI.PrintErr("Generating report in ", output)
141
-	out, err := os.Create(output)
141
+	out, err := o.Writer.Open(output)
142 142
 	if err != nil {
143 143
 		return err
144 144
 	}