From 004be9da2005289013167faf5c464cdc92b10dc0 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Fri, 5 Sep 2025 09:28:44 +0100 Subject: [PATCH] test(agent-task create): quote file paths to pass CI on Windows To keep the backslashes in Windows file paths and stop `shlex.Split` from interpreting them as escape characters, we need to quote the paths. Signed-off-by: Babak K. Shandiz --- pkg/cmd/agent-task/create/create_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/agent-task/create/create_test.go b/pkg/cmd/agent-task/create/create_test.go index 3a244c0e7..00134792f 100644 --- a/pkg/cmd/agent-task/create/create_test.go +++ b/pkg/cmd/agent-task/create/create_test.go @@ -50,7 +50,7 @@ func TestNewCmdCreate(t *testing.T) { }, { name: "from-file success", - args: fmt.Sprintf("-F %s", tmpFile), + args: fmt.Sprintf("-F '%s'", tmpFile), wantOpts: &CreateOptions{ ProblemStatement: "task description from file", }, @@ -75,7 +75,7 @@ func TestNewCmdCreate(t *testing.T) { }, { name: "empty file", - args: fmt.Sprintf("-F %s", tmpEmptyFile), + args: fmt.Sprintf("-F '%s'", tmpEmptyFile), wantErr: "task description file is empty", }, {