1 |
>>>>> On Thu, 19 May 2016, Amadeusz Żołnowski wrote: |
2 |
|
3 |
> Ulrich Mueller <ulm@g.o> writes: |
4 |
>> Yes, of course. "|| die -n || return" if you want the function to |
5 |
>> return at that point, if it was called under nonfatal. |
6 |
>> |
7 |
>>> https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6 |
8 |
>> |
9 |
>> Note that the ${?} in the code example there is redundant. |
10 |
|
11 |
> Why redundant? I imagine we can call it like: |
12 |
|
13 |
> if ! nonfatal efoo; then |
14 |
> do_something_on_error |
15 |
> fi |
16 |
|
17 |
> can't we? |
18 |
|
19 |
The status of the last command will be returned in any case, so there |
20 |
is no difference between "|| return" and "|| return $?". |
21 |
|
22 |
Ulrich |