kindsys: Fix CUE code generation on Windows (#62812)

* fix Windows paths

* fix remaining paths issues

* clean up multiple use of Dir()

* fix headers in generated files
This commit is contained in:
Agnès Toulet
2023-02-02 21:06:55 +01:00
committed by GitHub
parent 060e0a4d18
commit 121e384fab
6 changed files with 8 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ func (psr *declParser) Parse(root fs.FS) ([]*PluginDecl, error) {
decls := make([]*PluginDecl, 0)
for _, plugin := range plugins {
path := filepath.Dir(plugin)
path := filepath.ToSlash(filepath.Dir(plugin))
base := filepath.Base(path)
if skip, ok := psr.skip[base]; ok && skip {
continue