diff --git a/codegen/data.go b/codegen/data.go index 3a636e3bdb..06f6690a11 100644 --- a/codegen/data.go +++ b/codegen/data.go @@ -3,7 +3,7 @@ package codegen import ( "fmt" "os" - "path/filepath" + "path" "sort" "strings" @@ -177,8 +177,8 @@ func BuildData(cfg *config.Config) (*Data, error) { return nil, fmt.Errorf("failed to get working directory: %w", err) } outputDir := cfg.Exec.Dir() - sourcePath := filepath.Join(wd, s.Name) - relative, err := filepath.Rel(outputDir, sourcePath) + sourcePath := path.Join(wd, s.Name) + relative, err := path.Rel(outputDir, sourcePath) if err != nil { return nil, fmt.Errorf("failed to compute path of %s relative to %s: %w"+sourcePath, outputDir, err) }