Set remote iso path

This commit is contained in:
bugbuilder 2017-07-23 03:20:06 -04:00
parent 4023b618b4
commit 84ad413e23
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ func (s *stepRemoteUpload) Run(state multistep.StateBag) multistep.StepAction {
checksumType := config.ISOChecksumType
if !strings.HasPrefix(path, "skip_upload:") {
ui.Say(s.Message)
log.Printf("Remote uploading: %s", path)
newPath, err := remote.UploadISO(path, checksum, checksumType)
if err != nil {
err := fmt.Errorf("Error uploading file: %s", err)
state.Put("error", err)
@ -47,7 +47,7 @@ func (s *stepRemoteUpload) Run(state multistep.StateBag) multistep.StepAction {
}
state.Put(s.Key, newPath)
} else {
state.Put(s.Key, strings.Split("skip_upload:", path)[0])
state.Put(s.Key, strings.Split(path, "skip_upload:")[1])
}
return multistep.ActionContinue