From 1bbc4d95bec74c069e83b7d968bafaa83c3112a7 Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Fri, 20 Sep 2024 16:02:02 +0200 Subject: [PATCH] remove getEnvOrDefault --- internal/env/env.go | 7 ------- internal/fingerprint/sources_checksum.go | 1 - internal/flags/flags.go | 2 +- taskfile/ast/task.go | 1 + 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/env/env.go b/internal/env/env.go index ceff956a55..8aded37489 100644 --- a/internal/env/env.go +++ b/internal/env/env.go @@ -36,10 +36,3 @@ func isTypeAllowed(v any) bool { return false } } - -func GetEnvOrDefault(key, fallback string) string { - if value, ok := os.LookupEnv(key); ok { - return value - } - return fallback -} diff --git a/internal/fingerprint/sources_checksum.go b/internal/fingerprint/sources_checksum.go index 91cb6e384a..7b9f50b4fc 100644 --- a/internal/fingerprint/sources_checksum.go +++ b/internal/fingerprint/sources_checksum.go @@ -32,7 +32,6 @@ func (checker *ChecksumChecker) IsUpToDate(t *ast.Task) (bool, error) { if len(t.Sources) == 0 { return false, nil } - checksumFile := checker.checksumFilePath(t) data, _ := os.ReadFile(checksumFile) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 5cfa938ef9..0052c33037 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -1,6 +1,7 @@ package flags import ( + "cmp" "errors" "log" "os" @@ -9,7 +10,6 @@ import ( "github.com/spf13/pflag" - "github.com/go-task/task/v3/internal/env" "github.com/go-task/task/v3/internal/experiments" "github.com/go-task/task/v3/taskfile/ast" ) diff --git a/taskfile/ast/task.go b/taskfile/ast/task.go index de6986c6b8..ac4bb21b30 100644 --- a/taskfile/ast/task.go +++ b/taskfile/ast/task.go @@ -83,6 +83,7 @@ func (t *Task) WildcardMatch(name string) (bool, []string) { return false, wildcards } + fmt.Printf("wildcards: %v\n", wildcards) return true, wildcards }