Commit 2e8ead8d authored by Jakub Sztandera's avatar Jakub Sztandera

fix error handling

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent 5a1a03bd
......@@ -118,9 +118,13 @@ Print out all dependencies and their versions.`,
}
return
}
res.Emit(toDependency(&info.Main))
if err := res.Emit(toDependency(&info.Main)); err != nil {
return err
}
for _, dep := range info.Deps {
res.Emit(toDependency(dep))
if err := res.Emit(toDependency(dep)); err != nil {
return err
}
}
return nil
},
......@@ -131,7 +135,7 @@ Print out all dependencies and their versions.`,
fmt.Fprintf(w, " => %s", dep.ReplacedBy)
}
fmt.Fprintf(w, "\n")
return errors.New("test")
return nil
}),
},
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment