[P2] set_partition_uuids (L573-594) leaks partition_plan into the caller's scope — missing local. (commenting near the UKI typecode change since L579 is not in the diff)
set_partition_uuids() {
local -n pp_uuid
pp_uuid="${1:?}"
partition_plan="${2:?}" # <-- L579, missing `local`
The sibling set_partition_sizes correctly declares local ... partition_plan (L235). Copy-paste drift.
Today the only callers use uppercase PARTITION_PLAN, so no collision, but any future caller (e.g. a helper inside img2img) with its own lowercase local partition_plan will find its value silently clobbered by this function via bash's dynamic scoping.
Fix: local partition_plan="${2:?}" on L579.
Originally posted by @jmt-lab in #701 (comment)
[P2]
set_partition_uuids(L573-594) leakspartition_planinto the caller's scope — missinglocal. (commenting near the UKI typecode change since L579 is not in the diff)The sibling
set_partition_sizescorrectly declareslocal ... partition_plan(L235). Copy-paste drift.Today the only callers use uppercase
PARTITION_PLAN, so no collision, but any future caller (e.g. a helper inside img2img) with its own lowercaselocal partition_planwill find its value silently clobbered by this function via bash's dynamic scoping.Fix:
local partition_plan="${2:?}"on L579.Originally posted by @jmt-lab in #701 (comment)