1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 19:20:53 +02:00

44443: POSIX allows exporting readonly variables

This commit is contained in:
Martijn Dekker 2019-06-22 12:54:34 +01:00 committed by Peter Stephenson
parent b8dc5a7f6d
commit 1b1cb44161
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2019-06-23 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Martijn: 44443: Src/builtin.c: POSIX allows exporting readonly
variables.
2019-06-20 Peter Stephenson <p.stephenson@samsung.com>
* 44435: Doc/Zsh/expn.yo, NEWS, README, Src/Zle/compctl.c,

View file

@ -2171,7 +2171,7 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
!ASG_VALUEP(asg))
on |= PM_UNSET;
else if (usepm && (pm->node.flags & PM_READONLY) &&
!(on & PM_READONLY)) {
!(on & PM_READONLY) && func != BIN_EXPORT) {
zerr("read-only variable: %s", pm->node.nam);
return NULL;
}