throughout this patch, you're saving proc and checking its exit status, but remote.run is already doing that for you and will raise a CommandFailed exception if the status is non-zero. So there's no need for checking it or any of the display_error calls.