Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58a6752

Browse files
committed
fix(cli/templatepush): only implicitly read from stdin if the directory flag is unset
1 parent6606d8b commit58a6752

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎cli/templatepush.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,9 @@ func (pf *templateUploadFlags) stdin(inv *serpent.Invocation) (out bool) {
309309
inv.Logger.Info(inv.Context(),"uploading tar read from stdin")
310310
}
311311
}()
312-
// We let the directory override our isTTY check
313-
returnpf.directory=="-"|| (!isTTYIn(inv)&&pf.directory==".")
312+
// We read a tar from stdin if the directory is "-" or if we're not in a
313+
// TTY and the directory flag is unset.
314+
returnpf.directory=="-"|| (!isTTYIn(inv)&&!inv.ParsedFlags().Lookup("directory").Changed)
314315
}
315316

316317
func (pf*templateUploadFlags)upload(inv*serpent.Invocation,client*codersdk.Client) (*codersdk.UploadResponse,error) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp