Skip to content

Commit 27fb340

Browse files
Revert "bug: expand interpreter args to multiple arguments"
This reverts commit b5e053c.
1 parent 981de74 commit 27fb340

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

pkg/engine/cmd.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,6 @@ func (e *Engine) newCommand(ctx context.Context, extraEnv []string, tool types.T
211211
cmdArgs = append(cmdArgs, f.Name())
212212
}
213213

214-
// This is a bit hacky, but we want ARGS="x y" to expand to "x" and "y" not "x y" if used as arguments
215-
cmdArgs, err = shlex.Split(strings.Join(cmdArgs, " "))
216-
if err != nil {
217-
return nil, nil, err
218-
}
219-
220214
// This is a workaround for Windows, where the command interpreter is constructed with unix style paths
221215
// It converts unix style paths to windows style paths
222216
if runtime.GOOS == "windows" {

pkg/tests/runner_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -572,19 +572,3 @@ func TestExport(t *testing.T) {
572572
require.NoError(t, err)
573573
assert.Equal(t, "TEST RESULT CALL: 3", x)
574574
}
575-
576-
func TestShlex(t *testing.T) {
577-
runner := tester.NewRunner(t)
578-
579-
runner.RespondWith(tester.Result{
580-
Func: types.CompletionFunctionCall{
581-
Name: "transient",
582-
},
583-
})
584-
x, err := runner.Run("", `{
585-
"args":" x y z "
586-
}`)
587-
require.NoError(t, err)
588-
// The fact the white space is all perfect means that the string didn't get passed as one arg but multiple
589-
assert.Equal(t, "x y z\n", x)
590-
}

pkg/tests/testdata/TestShlex/test.gpt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)