Unwrap multiple errors

This commit is contained in:
andig 2025-08-02 12:38:28 +02:00
parent 3b101279ef
commit 0a59189d27

View file

@ -357,7 +357,12 @@ func runRoot(cmd *cobra.Command, args []string) {
if err != nil {
// improve error message
err = wrapFatalError(err)
valueChan <- util.Param{Key: keys.Fatal, Val: err}
if uw, ok := err.(interface{ Unwrap() []error }); ok {
valueChan <- util.Param{Key: keys.Fatal, Val: uw.Unwrap()}
} else {
valueChan <- util.Param{Key: keys.Fatal, Val: err}
}
// TODO stop reboot loop if user updates config (or show countdown in UI)
log.FATAL.Println(err)