medium: command: Propagate error from auto-commit (bnc#868533)
When in non-interactive mode or when committing on navigation and
the commit fails, make sure to propagate the error to return
non-zero if not in interactive mode.