mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 13:06:30 +02:00
End path walk when an error is encountered in detect command, fixes nil pointer deref
This commit is contained in:
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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user