Skip to content

Commit 426dc32

Browse files
committedMar 12, 2024
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
1 parent 8b86cf2 commit 426dc32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎pkg/config/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"errors"
77
"fmt"
88
"os"
9+
"path/filepath"
910
"reflect"
1011
"regexp"
1112
"strings"
@@ -661,7 +662,7 @@ func (c *Config) subPackages(
661662
return nil, fmt.Errorf("failed to make subroot relative to root: %w", err)
662663
}
663664
absolutePackageName := packageRootName.Join(relativeFilesystemPath.Parts()...)
664-
subPackages = append(subPackages, absolutePackageName.String())
665+
subPackages = append(subPackages, filepath.ToSlash(absolutePackageName.String()))
665666
}
666667

667668
return subPackages, nil

0 commit comments

Comments
 (0)