From 426dc32ec7c50b4153761cfd2e7b41992bc88c7e Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Tue, 12 Mar 2024 19:10:55 +0000 Subject: [PATCH] fix: recursive config failure on windows Fix failure with "package not found in config" on Windows due to use of backslash in package name instead of forward slash, resulting in the configuration for the sub package not being found. Fixes: #727 --- pkg/config/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index b8ee8311..41ef2441 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "os" + "path/filepath" "reflect" "regexp" "strings" @@ -661,7 +662,7 @@ func (c *Config) subPackages( return nil, fmt.Errorf("failed to make subroot relative to root: %w", err) } absolutePackageName := packageRootName.Join(relativeFilesystemPath.Parts()...) - subPackages = append(subPackages, absolutePackageName.String()) + subPackages = append(subPackages, filepath.ToSlash(absolutePackageName.String())) } return subPackages, nil