it's at least third time I see this code, maybe create a functions `pkg_nothing_to_do` in `scripts/functions/utility` (maybe `utility_system`) and call it like:
```bash
__rvm_try_sudo pkg install "$@" || pkg_nothing_to_do || return $?
```