chore: update error message

This commit is contained in:
Siyuan Miao 2025-05-18 22:40:25 +02:00
parent 4a07afaba7
commit 25a3b625fa
1 changed files with 6 additions and 1 deletions

View File

@ -96,7 +96,12 @@ func (tx *UsbGadgetTransaction) removeFile(component string, path string, descri
}
func (tx *UsbGadgetTransaction) Commit() error {
tx.log.Info().Interface("transaction", tx.c.Apply()).Msg("committing transaction")
err := tx.c.Apply()
if err != nil {
tx.log.Error().Err(err).Msg("failed to update usbgadget configuration")
return err
}
tx.log.Info().Msg("usbgadget configuration updated")
return nil
}