Bail out on upgrade in a more shell-friendly way

Manipulating env var might be problematic
Merge pull request #3921 from BanzaiMan/dev/hasari/bz1020177

Merged by openshift-bot