Skip to content

Commit

Permalink
plan file compatiblity for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalkaoz committed Jan 31, 2023
1 parent b9046b3 commit bf1fa0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
"os"
"path/filepath"
"strings"
"time"

"github.com/terrarium-tf/cli/lib"
Expand All @@ -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
Expand Down

0 comments on commit bf1fa0a

Please sign in to comment.