func downloadPackages() { errMsg := "\nProblem while downloading the assets from the internet for the first time. Trace: %s" installedDir, err := utils.Install(PackagesURL, packagesInstallDir) if err != nil { printer.Dangerf(errMsg, err.Error()) return } // installedDir is the packagesInstallDir+PackagesExportedName, we will copy these contents to the parent, to the packagesInstallDir, because of import paths. err = utils.CopyDir(installedDir, packagesInstallDir) if err != nil { printer.Dangerf(errMsg, err.Error()) return } // we don't exit on errors here. // try to remove the unzipped folder utils.RemoveFile(installedDir[0 : len(installedDir)-1]) }
// Remove deletes/removes/rm a file func (d *pluginDownloadManager) Remove(filePath string) error { return utils.RemoveFile(filePath) }