Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helpers.sh: Robustify functions and don't exit 1
**Summary** Shellcheck recklessly introduced a bug that will make functions `exit 1` which causes the shell to exit, if the function in question doesn not complete successfully. This commit fixes this "small" oversight. In addition, this commit also makes the `gotopkg` and `goroot` functions more robust and yields hopefully useful error messages as necessary. **Test Plan** ``` ermo@solbox:~ $ goroot fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). If you're not somewhere in the solus packages git dir, use gotosoluspkgs instead. ermo@solbox:~/ $ gotosoluspkgs ermo@solbox:~/repos/getsolus/solpkgs $ cd ermo@solbox:~ $ gotopkg No package specified, going to the root of the solus packages git dir instead. ermo@solbox:~/repos/getsolus/solpkgs $ cd ermo@solbox:~ $ gotopkg grub2 ermo@solbox:~/repos/getsolus/solpkgs/packages/g/grub2 $ ``` Signed-off-by: Rune Morling <[email protected]>
- Loading branch information