Skip to content

Commit 85b2644

Browse files
committed
Show content of the file if argument is a file name
1 parent 94ad12f commit 85b2644

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

run/show.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package run
22

33
import (
44
"fmt"
5+
"os"
56
"strings"
67

78
"github.com/dex4er/tf/util"
@@ -20,6 +21,8 @@ func Show(args []string) error {
2021
noOutputs = false
2122
} else if strings.HasPrefix(arg, "-") {
2223
newArgs = append(newArgs, arg)
24+
} else if _, err := os.Stat(arg); err == nil {
25+
newArgs = append(newArgs, arg)
2326
} else {
2427
resources = append(resources, util.AddQuotes(arg))
2528
}

0 commit comments

Comments
 (0)