2013-06-04 18:00:58 -04:00
|
|
|
package vmware
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mitchellh/multistep"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
type stepPrepareOutputDir struct{}
|
|
|
|
|
|
|
|
func (stepPrepareOutputDir) Run(state map[string]interface{}) multistep.StepAction {
|
|
|
|
config := state["config"].(*config)
|
|
|
|
|
|
|
|
if err := os.MkdirAll(config.OutputDir, 0755); err != nil {
|
2013-06-20 00:20:48 -04:00
|
|
|
state["error"] = err
|
2013-06-04 18:00:58 -04:00
|
|
|
return multistep.ActionHalt
|
|
|
|
}
|
|
|
|
|
|
|
|
return multistep.ActionContinue
|
|
|
|
}
|
|
|
|
|
|
|
|
func (stepPrepareOutputDir) Cleanup(map[string]interface{}) {}
|