From 09bd941c731d22907021c47694806316fccd3652 Mon Sep 17 00:00:00 2001 From: Steve Tooke Date: Thu, 19 Sep 2024 09:17:55 +0100 Subject: [PATCH] Add debugging --- internal/digest/digest.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/digest/digest.go b/internal/digest/digest.go index 21e70a0b..5f8d9954 100644 --- a/internal/digest/digest.go +++ b/internal/digest/digest.go @@ -50,10 +50,14 @@ func DirSha256(dirPath string, excludePaths []string, logger *logger.Logger) (st return "", err } defer digestsFile.Close() - ignoredPaths, err := excludePathsFromFile(filepath.Join(dirPath, ".kosli_ignore")) + ignoreFilePath := filepath.Join(dirPath, ".kosli_ignore") + ignoredPaths, err := excludePathsFromFile(ignoreFilePath) if err != nil { return "", err } + if len(ignoredPaths) > 0 { + logger.Debug(" -> ignore file used %s -- excluding paths: %s", ignoreFilePath, ignoredPaths) + } excludePaths = append(excludePaths, ignoredPaths...) err = calculateDirContentSha256(digestsFile, dirPath, tmpDir, excludePaths, logger) if err != nil {