Skip to content

Commit 11fc1e8

Browse files
authored
fix: fix missing echo in kcl run (#184)
1 parent 2dcc098 commit 11fc1e8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/fs/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
func GenTempFileFromStdin() (string, error) {
11-
tempFile, err := os.CreateTemp("", "stdin")
11+
tempFile, err := os.CreateTemp("", "stdin-*.k")
1212
if err != nil {
1313
return "", err
1414
}

pkg/options/run.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ func (o *RunOptions) Complete(args []string) error {
207207
}
208208

209209
for _, arg := range args {
210+
if arg == "-" {
211+
o.Entries = append(o.Entries, arg)
212+
continue
213+
}
210214

211215
modSpec := downloader.ModSpec{}
212216
err := modSpec.FromString(arg)

0 commit comments

Comments
 (0)