github.com/mitchellh/packer@v1.3.2/builder/vmware/common/driver_config.go (about)

     1  package common
     2  
     3  import (
     4  	"os"
     5  
     6  	"github.com/hashicorp/packer/template/interpolate"
     7  )
     8  
     9  type DriverConfig struct {
    10  	FusionAppPath string `mapstructure:"fusion_app_path"`
    11  }
    12  
    13  func (c *DriverConfig) Prepare(ctx *interpolate.Context) []error {
    14  	if c.FusionAppPath == "" {
    15  		c.FusionAppPath = os.Getenv("FUSION_APP_PATH")
    16  	}
    17  	if c.FusionAppPath == "" {
    18  		c.FusionAppPath = "/Applications/VMware Fusion.app"
    19  	}
    20  
    21  	return nil
    22  }