Skip to content

Commit

Permalink
fix: recursive config failure on windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stevenh committed Mar 12, 2024
1 parent 8b86cf2 commit 426dc32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/config/config.go
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"os"
"path/filepath"
"reflect"
"regexp"
"strings"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 426dc32

Please sign in to comment.