From bf1fa0a423b70e821e0100b2fd396813e231204d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=B6nthal?= Date: Tue, 31 Jan 2023 13:50:38 +0100 Subject: [PATCH] plan file compatiblity for windows --- cmd/apply.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/apply.go b/cmd/apply.go index 7290f4b..4f101ac 100644 --- a/cmd/apply.go +++ b/cmd/apply.go @@ -28,6 +28,7 @@ import ( "github.com/spf13/cobra" "os" "path/filepath" + "strings" "time" "github.com/terrarium-tf/cli/lib" @@ -43,7 +44,7 @@ func NewApplyCommand(root *cobra.Command) { Run: func(cmd *cobra.Command, args []string) { tf, ctx, files, _ := lib.Executor(*cmd, args[0], args[1], true) - planFile := fmt.Sprintf("%s-%s.tfplan", time.Now().Format(time.RFC3339), args[0]) + planFile := fmt.Sprintf("%s-%s.tfplan", strings.Replace(time.Now().Format(time.RFC3339), ":", "-", -1), args[0]) planFile, _ = filepath.Abs(planFile) //plan