Merge pull request #8 from Draylar/master

Print file name in file export error messages
This commit is contained in:
comp500 2020-10-18 23:14:55 +01:00 committed by GitHub
commit a23165d0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,13 +114,13 @@ var exportCmd = &cobra.Command{
} }
modFile, err := exp.Create(filepath.ToSlash(filepath.Join("overrides", path))) modFile, err := exp.Create(filepath.ToSlash(filepath.Join("overrides", path)))
if err != nil { if err != nil {
fmt.Printf("Error creating mod file: %s\n", err.Error()) fmt.Printf("Error creating mod file %s: %s\n", path, err.Error())
// TODO: exit(1)? // TODO: exit(1)?
continue continue
} }
err = mod.DownloadFile(modFile) err = mod.DownloadFile(modFile)
if err != nil { if err != nil {
fmt.Printf("Error downloading mod file: %s\n", err.Error()) fmt.Printf("Error downloading mod file %s: %s\n", path, err.Error())
// TODO: exit(1)? // TODO: exit(1)?
continue continue
} }
@ -237,7 +237,7 @@ func loadMods(index core.Index) []core.Mod {
for _, v := range modPaths { for _, v := range modPaths {
modData, err := core.LoadMod(v) modData, err := core.LoadMod(v)
if err != nil { if err != nil {
fmt.Printf("Error reading mod file: %s\n", err.Error()) fmt.Printf("Error reading mod file %s: %s\n", v, err.Error())
// TODO: exit(1)? // TODO: exit(1)?
continue continue
} }