[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "return" should not continue script execution, even if used inapprop
From: |
Robert Elz |
Subject: |
Re: "return" should not continue script execution, even if used inappropriately |
Date: |
Mon, 07 Jan 2019 16:20:46 +0700 |
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.
| You could also do the following if you want a script to work under either
| condition:
|
| return 2>&1 || exit
No, that is a waste of time. when it is not in a . script (or function)
what that return would do is unspecified, and having it simply set the
exit code to 0 is one of the (many) reasonable possibilities.)
kre
- "return" should not continue script execution, even if used inappropriately, Robert Hailey, 2019/01/05
- Re: "return" should not continue script execution, even if used inappropriately, Chet Ramey, 2019/01/06
- Re: "return" should not continue script execution, even if used inappropriately, Dennis Williamson, 2019/01/06
- Re: "return" should not continue script execution, even if used inappropriately, Robert Elz, 2019/01/07
- Re: "return" should not continue script execution, even if used inappropriately,
Robert Elz <=
- Re: "return" should not continue script execution, even if used inappropriately, Greg Wooledge, 2019/01/07
- Re: "return" should not continue script execution, even if used inappropriately, Robert Elz, 2019/01/07
- Re: "return" should not continue script execution, even if used inappropriately, don fong, 2019/01/09
- Re: "return" should not continue script execution, even if used inappropriately, Robert Elz, 2019/01/10
- Re: "return" should not continue script execution, even if used inappropriately, don fong, 2019/01/20
- Re: "return" should not continue script execution, even if used inappropriately, Greg Wooledge, 2019/01/21
- Re: "return" should not continue script execution, even if used inappropriately, Robert Elz, 2019/01/20
- Re: "return" should not continue script execution, even if used inappropriately, konsolebox, 2019/01/24
- Re: "return" should not continue script execution, even if used inappropriately, don fong, 2019/01/24