Merge pull request #5802 from arizvisa/GH-5789
Some chances to log errors were missed inside step_create_floppy.go for floppy_files
This commit is contained in:
commit
5ef0c2280f
@ -155,7 +155,10 @@ func (s *StepCreateFloppy) Run(state multistep.StateBag) multistep.StepAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, crawlfilename := range crawlDirectoryFiles {
|
for _, crawlfilename := range crawlDirectoryFiles {
|
||||||
s.Add(cache, crawlfilename)
|
if err = s.Add(cache, crawlfilename); err != nil {
|
||||||
|
state.Put("error", fmt.Errorf("Error adding file from floppy_files : %s : %s", filename, err))
|
||||||
|
return multistep.ActionHalt
|
||||||
|
}
|
||||||
s.FilesAdded[crawlfilename] = true
|
s.FilesAdded[crawlfilename] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +168,10 @@ func (s *StepCreateFloppy) Run(state multistep.StateBag) multistep.StepAction {
|
|||||||
|
|
||||||
// add just a single file
|
// add just a single file
|
||||||
ui.Message(fmt.Sprintf("Copying file: %s", filename))
|
ui.Message(fmt.Sprintf("Copying file: %s", filename))
|
||||||
s.Add(cache, filename)
|
if err = s.Add(cache, filename); err != nil {
|
||||||
|
state.Put("error", fmt.Errorf("Error adding file from floppy_files : %s : %s", filename, err))
|
||||||
|
return multistep.ActionHalt
|
||||||
|
}
|
||||||
s.FilesAdded[filename] = true
|
s.FilesAdded[filename] = true
|
||||||
}
|
}
|
||||||
ui.Message("Done copying files from floppy_files")
|
ui.Message("Done copying files from floppy_files")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user