Skip to content

Commit 0290962

Browse files
committed
Fix panic
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent a099feb commit 0290962

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmd/root/run.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,10 @@ func (f *runExecFlags) createLocalRuntimeAndSession(ctx context.Context, loadRes
416416

417417
func (f *runExecFlags) handleExecMode(ctx context.Context, out *cli.Printer, rt runtime.Runtime, sess *session.Session, args []string) error {
418418
// args[0] is the agent file; args[1:] are user messages for multi-turn conversation
419-
userMessages := args[1:]
419+
var userMessages []string
420+
if len(args) > 1 {
421+
userMessages = args[1:]
422+
}
420423

421424
err := cli.Run(ctx, out, cli.Config{
422425
AppName: AppName,

0 commit comments

Comments
 (0)