1 |
On Thursday 27 September 2007, George Shapovalov wrote: |
2 |
> Thursday, 27. September 2007, Donnie Berkholz Ви написали: |
3 |
> > > + if [[ ${profiles[@]} == "${MARKER}*" ]]; then |
4 |
> > > + exit |
5 |
> > |
6 |
> > I'm surprised to see exit called in a function instead of returning |
7 |
> > nonzero. |
8 |
> |
9 |
> This exit here indicates not a very usual but a valid situation, - no gnat |
10 |
> profile has been activated yet. So, this is not an error, at least not |
11 |
> always. But yes, returning a non zero also possible, though testing the |
12 |
> result is not that different from testing for a non-zero string, and the |
13 |
> latter is not intuitively percieved as an error :). |
14 |
|
15 |
i think more to the point, ebuilds/eclasses should never be calling `exit` |
16 |
|
17 |
if you want to "return an empty string", then you do `return` |
18 |
-mike |