Skip to content

Commit

Permalink
fix porchctl push method for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBudnyk authored Aug 17, 2024
1 parent 0c7dc5c commit 507b2e3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/cli/commands/rpkg/push/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,12 @@ func readFromDir(dir string) (map[string]string, error) {
// Return an early error here to prevent pushing corrupt content.
return fmt.Errorf("file %s is not a valid UTF-8 text file: current porch API doesn't support binary files", path)
}
resources[rel] = string(contents)
resources[filepath.ToSlash(rel)] = string(contents)
return nil
}); err != nil {
return nil, err
}
newRes := make(map[string]string)
for key, value := range resources {
newKey := filepath.ToSlash(key)
newRes[newKey] = value
}
return newRes, nil
return resources, nil
}

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

0 comments on commit 507b2e3

Please sign in to comment.