Add more detail for errors where the problem is that TEMPDIR is filled up

This commit is contained in:
Megan Marsh 2018-11-08 15:21:40 -08:00
parent b01f4a61f8
commit 812e009e57
1 changed files with 4 additions and 1 deletions

View File

@ -804,7 +804,10 @@ func scpUploadFile(dst string, src io.Reader, w io.Writer, r *bufio.Reader, fi *
log.Println("[DEBUG] Copying input data into temporary file so we can read the length") log.Println("[DEBUG] Copying input data into temporary file so we can read the length")
if _, err := io.Copy(tf, src); err != nil { if _, err := io.Copy(tf, src); err != nil {
return err return fmt.Errorf("Error copying input data into local temporary "+
"file. Check that TEMPDIR has enough space. Please see "+
"https://www.packer.io/docs/other/environment-variables.html#tmpdir"+
"for more info. Error: %s", err)
} }
// Sync the file so that the contents are definitely on disk, then // Sync the file so that the contents are definitely on disk, then