Skip to content

Commit 49ba5ef

Browse files
fix: reading tool from stdin using 'gptscript -'
1 parent d79063b commit 49ba5ef

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/cli/gptscript.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ func (r *GPTScript) readProgram(ctx context.Context, args []string) (prg types.P
176176
if err != nil {
177177
return prg, err
178178
}
179-
prg, err = loader.ProgramFromSource(ctx, string(data), r.SubTool)
180-
if err != nil {
181-
return prg, err
182-
}
179+
return loader.ProgramFromSource(ctx, string(data), r.SubTool)
183180
}
184181

185182
return loader.Program(ctx, args[0], r.SubTool)

0 commit comments

Comments
 (0)