niieani / bash-oo-framework

Bash Infinity is a modern standard library / framework / boilerplate for Bash
https://github.com/niieani/bash-oo-framework/discussions
MIT License
5.57k stars 247 forks source link

Remove 'i/s' options from __oo__presetShellOpts in try command #72

Closed Cj-bc closed 6 years ago

Cj-bc commented 6 years ago

set -i/set -s are no longer valid so that I delete them. When I use my script which use tryCatch by sourcing, an error has occured because of this. I'm sure this way of executing (by sourcing scripts) is not common. I do while testing and developing. Anyway, as we don't need those two options, I decided to delete them.

This is what I've got before this change(blib::install is my command defined in blib.oo.sh):

<X_X>:blib$ source ./blib.oo.sh
$?is0
<X_X>:blib$ blib::install Cj-bc/libtar
bash: set: -i: invalid option
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
niieani commented 6 years ago

Thanks @Cj-bc