Closed livioribeiro closed 4 years ago
Have the same issue. Would love to know if this is a correct fix and get an update.
Actually that isn't working for me 😭
I just found that the solution is to edit a few lines before that:
https://github.com/edc/bass/blob/c0d11420f35cfbcb62f94be0dfcf9baf70a9cea5/functions/__bass.py#L69
Changing that to:
new_env = new_env.strip() if new_env else old_env
But then again, I do not know the consequences of doing that.
Just pushed a fix. Hope it helps.
Sorry to revive an old issue, but this happens to me if I exit a script early with an exit 0
statement. Without the ability to exit early, scripts have to be written with a bunch of case
or if/then
code.
I looked at __bass.py
and the code mentioned in the comments above is not there. Was the fix reverted?
I overlooked the fact that the scripts are sourced, so I should be using return 0
instead.
I'm using Fedora 31 and just installed bass and I receive the following errors when running any command with that does not have a status code equal to "0":
The problem is here: https://github.com/edc/bass/blob/c0d11420f35cfbcb62f94be0dfcf9baf70a9cea5/functions/__bass.py#L72
It seems that
new_env
is empty when the command does not return successfuly.I changed that line to
and the error is gone, but I really do not know the consequences of doing that