Skip to content

Commit

Permalink
Merge branch 'master' into escapespace
Browse files Browse the repository at this point in the history
  • Loading branch information
osteensco authored Oct 15, 2024
2 parents 40febc1 + df13da5 commit 776e5c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runner/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -375,6 +377,7 @@ func (c *Config) binPath() string {
}

return filepath.Join(c.Root, c.Build.Bin)

}

func (c *Config) tmpPath() string {
Expand Down
3 changes: 3 additions & 0 deletions runner/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'",

},
}

Expand Down

0 comments on commit 776e5c7

Please sign in to comment.