ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.14k stars 189 forks source link

Adding * to catch all other read responses to an unneeded upgrade to NOT continue the upgrade (standardized with the rest of the script). #178

Closed bnerickson closed 1 year ago

bnerickson commented 1 year ago

While using the interactive prompt to test whether the script will update when there are no updates available, I noticed that selecting anything other than lower-case "n" results in an upgrade taking place. I think this runs counter to the logic displayed in the rest of the script: that is, if the response is not "y" it should be treated as "n".

This was also annoying because my original response was upper-case "N" (which the prompt requested for "no"), but the upgrade happened anyway.

As an aside, it seems weird that (I think) this line is supposed to convert an empty response to "n", but having a case statement that catches anything with * makes said line redundant. At first I thought it was an attempt to lower-case the response, but the correct syntax (Bash 4) for that would be answer=${answer,,}