Skip to content

Commit

Permalink
fix porchtl push method for windows
Browse files Browse the repository at this point in the history
we are compiling the porchctl to use it on Windows. the proposed fix is changing the Windows path representation to the Unix-based one.
  • Loading branch information
RomanBudnyk authored Aug 13, 2024
1 parent 12b79b2 commit ecdaa61
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cli/commands/rpkg/push/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ func readFromDir(dir string) (map[string]string, error) {
}); err != nil {
return nil, err
}
return resources, nil
newRes := make(map[string]string)
for key, value := range resources {
newKey := strings.ReplaceAll(key, "\\", "/")
newRes[newKey] = value
}
return newRes, nil
}

func readFromReader(in io.Reader) (map[string]string, error) {
Expand Down

0 comments on commit ecdaa61

Please sign in to comment.