YunoHost / package_check

Shell script which check package actions: install, remove, upgrade, backup, restore…
GNU General Public License v3.0
21 stars 26 forks source link

Add set -ue to scripts #17

Closed JocelynDelalande closed 7 years ago

JocelynDelalande commented 7 years ago

Just to avoid continuing a script which got an error.

maniackcrudelis commented 7 years ago

You mean add set -eu in the package check scripts ?

JocelynDelalande commented 7 years ago

You mean add set -eu in the package check scripts ?

Yes

maniackcrudelis commented 7 years ago

I've already thought about that. But, it's more complicated for many conditional test, and more complicated to write the code because you can't deal with unset variable. And I'm not really sure that's any advantage to do that. There's no damage if a variable is not set, and no reason for any empty variables.

If a empty variable in the code cause any problem, you should report it and we can try to fix the problem.