We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6606d8b commit 58a6752Copy full SHA for 58a6752
cli/templatepush.go
@@ -309,8 +309,9 @@ func (pf *templateUploadFlags) stdin(inv *serpent.Invocation) (out bool) {
309
inv.Logger.Info(inv.Context(), "uploading tar read from stdin")
310
}
311
}()
312
- // We let the directory override our isTTY check
313
- return pf.directory == "-" || (!isTTYIn(inv) && pf.directory == ".")
+ // We read a tar from stdin if the directory is "-" or if we're not in a
+ // TTY and the directory flag is unset.
314
+ return pf.directory == "-" || (!isTTYIn(inv) && !inv.ParsedFlags().Lookup("directory").Changed)
315
316
317
func (pf *templateUploadFlags) upload(inv *serpent.Invocation, client *codersdk.Client) (*codersdk.UploadResponse, error) {
0 commit comments