Re: "return" should not continue script execution, even if used inapprop
From:
don fong
Subject:
Re: "return" should not continue script execution, even if used inappropriately
Date:
Mon, 7 Jan 2019 11:47:41 -0800
>
> Crazy python people.
>
there's a good reason for the "craziness": it enables individual testing of
the script's functions. it's a good idea, and IMHO it should be more
widely used in "production" shell scripts.
On Mon, Jan 7, 2019 at 5:56 AM Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> On Mon, Jan 07, 2019 at 04:20:46PM +0700, Robert Elz wrote:
> > Date: Sun, 6 Jan 2019 16:58:59 -0600
> > From: Dennis Williamson <dennistwilliamson@gmail.com>
> > Message-ID: <
>CANaoh6+BmBMCbLxGQUG7GxFML78e9tE+H8Oke9THWQupyFtRBA@mail.gmail.com>
> >
> > | You should be able to protect yourself from this by detecting if a
> script
> > | is not being sourced when it's intended that it must be and acting
> > | accordingly.
> >
> > If you can work out how to do that in a portable way, and modify the
> > script to do it (and that is a reasonable thing to do) that would work.
>
> Crazy python people.
>
>https://mywiki.wooledge.org/BashFAQ/109
>
>