Skip to content

Commit

Permalink
fix unit test TestComponentProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
haitham911 committed Dec 29, 2024
1 parent b1ddf63 commit 5509aab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func FindAllStackConfigsInPathsForStack(
matchedFileRelativePath := u.TrimBasePathFromPath(atmosConfig.StacksBaseAbsolutePath+"/", matchedFileAbsolutePath)

// Check if the provided stack matches a file in the config folders (excluding the files from `excludeStackPaths`)
stackMatch := matchesStackFilePattern(matchedFileAbsolutePath, stack)
stackMatch := matchesStackFilePattern(filepath.ToSlash(matchedFileAbsolutePath), stack)

if stackMatch {
allExcluded := true
Expand Down
2 changes: 2 additions & 0 deletions pkg/utils/file_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func JoinAbsolutePathWithPaths(basePath string, paths []string) ([]string, error

// TrimBasePathFromPath trims the base path prefix from the path
func TrimBasePathFromPath(basePath string, path string) string {
basePath = filepath.ToSlash(basePath)
path = filepath.ToSlash(path)
return strings.TrimPrefix(path, basePath)
}

Expand Down

0 comments on commit 5509aab

Please sign in to comment.