File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type GPTScript struct {
31
31
DisplayOptions
32
32
Debug bool `usage:"Enable debug logging"`
33
33
Quiet bool `usage:"No output logging" short:"q"`
34
- Output string `usage:"Save output to a file" short:"o"`
34
+ Output string `usage:"Save output to a file, or - for stdout " short:"o"`
35
35
Input string `usage:"Read input from a file (\"-\" for stdin)" short:"f"`
36
36
SubTool string `usage:"Use tool of this name, not the first tool in file"`
37
37
Assemble bool `usage:"Assemble tool to a single artifact, saved to --output"`
@@ -129,7 +129,7 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) error {
129
129
130
130
if r .Assemble {
131
131
var out io.Writer = os .Stdout
132
- if r .Output != "" {
132
+ if r .Output != "" && r . Output != "-" {
133
133
f , err := os .Create (r .Output )
134
134
if err != nil {
135
135
return fmt .Errorf ("opening %s: %w" , r .Output , err )
You can’t perform that action at this time.
0 commit comments