File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type GPTScript struct {
3131 DisplayOptions
3232 Debug bool `usage:"Enable debug logging"`
3333 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"`
3535 Input string `usage:"Read input from a file (\"-\" for stdin)" short:"f"`
3636 SubTool string `usage:"Use tool of this name, not the first tool in file"`
3737 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 {
129129
130130 if r .Assemble {
131131 var out io.Writer = os .Stdout
132- if r .Output != "" {
132+ if r .Output != "" && r . Output != "-" {
133133 f , err := os .Create (r .Output )
134134 if err != nil {
135135 return fmt .Errorf ("opening %s: %w" , r .Output , err )
You can’t perform that action at this time.
0 commit comments