1
0
mirror of https://github.com/packwiz/packwiz.git synced 2025-04-30 09:46:30 +02:00

End path walk when an error is encountered in detect command, fixes nil pointer deref

This commit is contained in:
comp500 2021-04-11 17:01:14 +01:00
parent bd9f5dbebc
commit f1009a3289

@ -35,6 +35,9 @@ var detectCmd = &cobra.Command{
var hashes []int var hashes []int
modPaths := make(map[int]string) modPaths := make(map[int]string)
err = filepath.Walk("mods", func(path string, info os.FileInfo, err error) error { err = filepath.Walk("mods", func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() { if info.IsDir() {
return nil return nil
} }