(inv *serpent.Invocation)
| 307 | } |
| 308 | |
| 309 | func (pf *templateUploadFlags) stdin(inv *serpent.Invocation) (out bool) { |
| 310 | defer func() { |
| 311 | if out { |
| 312 | inv.Logger.Info(inv.Context(), "uploading tar read from stdin") |
| 313 | } |
| 314 | }() |
| 315 | // We read a tar from stdin if the directory is "-" or if we're not in a |
| 316 | // TTY and the directory flag is unset. |
| 317 | return pf.directory == "-" || (!isTTYIn(inv) && !inv.ParsedFlags().Lookup("directory").Changed) |
| 318 | } |
| 319 | |
| 320 | func (pf *templateUploadFlags) upload(inv *serpent.Invocation, client *codersdk.Client) (*codersdk.UploadResponse, error) { |
| 321 | var content io.Reader |
no test coverage detected