Closed KalleDK closed 2 years ago
It would be nicer to catch specific errors rather than just set -e
the whole function. I'm not seeing much in there that can go wrong. It doesn't check that the input is valid and the sed
command looks questionable, but in general it shouldn't fail.
Unless, it's the same issue as in #113, where it's not being run as root. In which case I think the solution should be to move that check further up in the script.
I ran into it because the script was run by the wrong user, but didn't have an error. So if move the root check is the solution, then I'm all happy :)
Actually this change would break quite a lot of use cases, so I've had to revert it.
Instead, we'll assume nonint users know what they're doing. This is an internal and undocumented feature for which we do no offer support.
A way to help with #113 unless the solution is to move the root check to before the nonint switch