in plugin/source/multi/multi.go [52:71]
func (s *Source) DownloadToPath(dlPath string) error {
if err := os.MkdirAll(dlPath, 0755); err != nil {
return err
}
for i, src := range s.sources {
thisDl, err := ioutil.TempDir("", "go2chef-multi-")
if err != nil {
return err
}
if err := src.DownloadToPath(thisDl); err != nil {
s.logger.Errorf("failed to download source %d to %s", i, thisDl)
return err
}
if err := copy.Copy(thisDl, dlPath); err != nil {
s.logger.Errorf("failed to copy directory %s to %s", thisDl, dlPath)
return err
}
}
return nil
}