diff --git a/runner/config.go b/runner/config.go index 35154b75..ac32a4f1 100644 --- a/runner/config.go +++ b/runner/config.go @@ -330,9 +330,11 @@ func (c *Config) preprocess() error { c.Build.Bin, err = filepath.Abs(c.Build.Bin) // Account for spaces in filepath + if runtime.GOOS != "windows" { c.Build.Bin = fmt.Sprintf("'%s'", c.Build.Bin) } + return err } @@ -375,6 +377,7 @@ func (c *Config) binPath() string { } return filepath.Join(c.Root, c.Build.Bin) + } func (c *Config) tmpPath() string { diff --git a/runner/config_test.go b/runner/config_test.go index de853e0a..54be29a9 100644 --- a/runner/config_test.go +++ b/runner/config_test.go @@ -126,11 +126,14 @@ func TestConfPreprocess(t *testing.T) { name: "no spaces", space: false, suffix: "/_testdata/toml/tmp/main'", + + }, { name: "with spaces", space: true, suffix: "/_testdata/toml/tmp space/main'", + }, }