Skip to content

${var:=default} on a readonly target leaves rc 1 (GNU: 2) #402

Closed

Description

@caomengxuan666

Summary

${var:=default} against a readonly target reports the right diagnostic but leaves rc 1; GNU aborts with rc 2. Same via a nameref to a readonly target.

Reproducer (probe wt37-374 K074/K075)

unset RO; readonly RO; printf '<%s>\n' "${RO:=new}"
unset ROT REF; readonly ROT; declare -n REF=ROT; printf '<%s>\n' "${REF:=new}"

GNU: rc 2 both. rubash: rc 1 both. stderr identical (...: readonly variable).

GNU owner

subst.c parameter_brace_expand assignment branch (assignment failure propagates rc 2 through word expansion).

Artifacts

target/issue-suites/results/wt37-374/run/K074.* K075.*

Activity

  1. added
    bug
    on Oct 2, 2026
  2. added 2 commits that reference this issue on Oct 2, 2026
  3. caomengxuan666 commented on Oct 3, 2026

    @caomengxuan666
    MemberAuthor

    Landed on master through the wt38 pool recovery waves (CI green on the batch head); see the issueNNN regression suite and the lane matrices on the ticket trail. Carrier-domain #399 landed with the full true-baseline A/B held byte-identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions