Merge pull request #7939 from hashicorp/fix_7938

check container os, not host os, when creating container dir default
This commit is contained in:
Megan Marsh 2019-08-12 16:45:00 -07:00 committed by GitHub
commit 0eebebaedb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,6 @@ package docker
import (
"fmt"
"os"
"runtime"
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/communicator"
@ -125,7 +124,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
if c.ContainerDir == "" {
if runtime.GOOS == "windows" {
if c.WindowsContainer {
c.ContainerDir = "c:/packer-files"
} else {
c.ContainerDir = "/packer-files"