Merge pull request #188 from justincormack/make-tmp-dir

Create tmp dir in case required
This commit is contained in:
Justin Cormack 2017-11-20 16:59:27 +00:00 committed by GitHub
commit 63a5dedd28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"
"path/filepath"
"sort" "sort"
"strconv" "strconv"
"strings" "strings"
@ -145,6 +146,11 @@ func Build(m Moby, w io.Writer, pull bool, tp string) error {
MobyDir = defaultMobyConfigDir() MobyDir = defaultMobyConfigDir()
} }
// create tmp dir in case needed
if err := os.MkdirAll(filepath.Join(MobyDir, "tmp"), 0755); err != nil {
return err
}
iw := tar.NewWriter(w) iw := tar.NewWriter(w)
// add additions // add additions