Re: inconsistent readonly error behavior

2020-12-23 Thread Travis Everett
Got it. Thanks. :) On Wed, Dec 23, 2020 at 10:19 AM Chet Ramey wrote: > On 12/23/20 11:10 AM, Travis Everett wrote: > > I think I'm missing or misreading something. If I understood, the > > assignment and expansion errors are both shell errors that should have > the > > same exit behavior? > >

Re: inconsistent readonly error behavior

2020-12-23 Thread Chet Ramey
On 12/23/20 11:10 AM, Travis Everett wrote: I think I'm missing or misreading something. If I understood, the assignment and expansion errors are both shell errors that should have the same exit behavior? But I see the assignment error ending the list and returning to the top level, and the

Re: inconsistent readonly error behavior

2020-12-23 Thread Travis Everett
I think I'm missing or misreading something. If I understood, the assignment and expansion errors are both shell errors that should have the same exit behavior? But I see the assignment error ending the list and returning to the top level, and the expansion exiting the script: readonly sigh=1 if

Re: inconsistent readonly error behavior

2020-12-23 Thread Chet Ramey
On 12/22/20 12:21 PM, Travis Everett wrote: I don't understand what distinction you're trying to make; any example you can give? I added an extra near-copy of the script to the gist replacing the assignment with unset `unset' is a different thing. It's a special builtin, so POSIX requires a

Re: inconsistent readonly error behavior

2020-12-23 Thread Chet Ramey
On 12/21/20 11:28 PM, Travis Everett wrote: Bash Version: 5. 0Patch Level: 18 Release Status: release Description: While trying to intentionally trap/ignore EXIT in a sourced script, I noticed that I couldn't keep it from exiting when it tried to overwrite PATH, which I had set to

Re: inconsistent readonly error behavior

2020-12-22 Thread Oğuz
22 Aralık 2020 Salı tarihinde Travis Everett yazdı: > I don't understand what distinction you're trying to make; any example you > can give? > > I added an extra near-copy of the script to the gist replacing the > assignment with unset (https://gist.github.com/abathur/ >

Re: inconsistent readonly error behavior

2020-12-22 Thread Travis Everett
I don't understand what distinction you're trying to make; any example you can give? I added an extra near-copy of the script to the gist replacing the assignment with unset ( https://gist.github.com/abathur/8d18853e06f2a8cf3a97e45acda17f68#file-unset-sh-console), and corresponding output where

Re: inconsistent readonly error behavior

2020-12-21 Thread Oğuz
On Tue, Dec 22, 2020 at 7:28 AM Travis Everett wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64OS: darwin17.7.0 > Compiler: clang > Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security > uname output: Darwin ecf1160e 19.6.0 Darwin Kernel

inconsistent readonly error behavior

2020-12-21 Thread Travis Everett
Configuration Information [Automatically generated, do not change]: Machine: x86_64OS: darwin17.7.0 Compiler: clang Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: Darwin ecf1160e 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020;