[fix] cup ends silently on error

Fix for https://github.com/chocolatey/chocolatey/issues/312