robisonsantos / evm

Erlang Version Manager
117 stars 28 forks source link

`set -o errexit` affects all Bash usage after sourcing #43

Closed giang-nghg closed 2 years ago

giang-nghg commented 2 years ago

I wonder if adding this means the evm script is not supposed to be sourced anymore, or an unset of this option is needed at the end of the script? Because currently, after the script has done its job, the shell is still set to exit upon any errors, like mistyping a command.

At least observed on:

giang-nghg commented 2 years ago

Quick fix for anyone having this problem like me: Add set +o errexit after sourcing evm

robisonsantos commented 2 years ago

I removed that line now. I'll find a better way to handle the errors only within the functions without too many boilerplate

robisonsantos commented 2 years ago

Oh, that's a bug. I'll send the fix in a few minutes.

On Fri, Jun 10, 2022, 2:43 AM Giang Nguyen @.***> wrote:

Quick fix for anyone having this problem like me: Add set +o errexit after sourcing evm

— Reply to this email directly, view it on GitHub https://github.com/robisonsantos/evm/issues/43#issuecomment-1152177606, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA66LKIGK2D44S6HCCYT2TVOME45ANCNFSM5YNALYGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>