Skip to content

Commit 24b7deb

Browse files
committed
chore: wip windows path support
1 parent 8fba074 commit 24b7deb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/engine/cmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func (e *Engine) newCommand(ctx context.Context, extraEnv []string, tool types.T
296296
stop()
297297
return nil, nil, err
298298
}
299-
cmdArgs = append(cmdArgs, f.Name())
299+
cmdArgs = append(cmdArgs, strings.ReplaceAll(f.Name(), `\`, "/"))
300300
}
301301

302302
// This is a workaround for Windows, where the command interpreter is constructed with unix style paths

pkg/loader/loader.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ func loadLocal(base *source, name string) (*source, bool, error) {
7171
// We want to keep all strings in / format, and only convert to platform specific when reading
7272
// This is why we use path instead of filepath.
7373
filePath := name
74-
if !path.IsAbs(name) {
74+
// @ TODO this change might not be required if we stick with using busybox always on windows instead of getting the wsl bash.exe?
75+
if !filepath.IsAbs(name) {
7576
filePath = path.Join(base.Path, name)
7677
}
7778

0 commit comments

Comments
 (0)