mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
Don't write hash if retrieval failed
This commit is contained in:
parent
2d181f9f70
commit
f1ea588c83
@ -50,7 +50,7 @@ var rehashCmd = &cobra.Command{
|
||||
for dl := range session.StartDownloads() {
|
||||
if dl.Error != nil {
|
||||
fmt.Printf("Error retrieving %s: %v\n", dl.Mod.Name, dl.Error)
|
||||
}
|
||||
} else {
|
||||
dl.Mod.Download.HashFormat = args[0]
|
||||
dl.Mod.Download.Hash = dl.Hashes[args[0]]
|
||||
_, _, err := dl.Mod.Write()
|
||||
@ -58,6 +58,7 @@ var rehashCmd = &cobra.Command{
|
||||
fmt.Printf("Error saving mod %s: %v\n", dl.Mod.Name, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
// TODO pass the hash to index instead of recomputing from scratch
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user