fix(assemble): accept the volume manifest key and split values

Map the reference key `volume` (alongside `volumes`) and whitespace-split
the value so `volume="/a:/b /c:/d"` becomes separate mounts, matching
distrobox-assemble.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
Luca Di Maio
2026-06-25 09:07:20 +02:00
parent 1f2e769fb9
commit c662a153cb
+7 -2
View File
@@ -209,8 +209,13 @@ func sectionToItem(section *ini.Section, env *userenv.UserEnvironment) Item { //
item.InitHooks = append(item.InitHooks, vals...)
case "pre_init_hooks":
item.PreInitHooks = append(item.PreInitHooks, vals...)
case "volumes":
item.Volumes = append(item.Volumes, vals...)
case "volume", "volumes":
// `volume` is the reference shell key (distrobox-assemble:63,451);
// `volumes` is also accepted. Values are whitespace-split so a single
// `volume="/a:/b /c:/d"` yields separate mounts, matching the shell.
for _, v := range vals {
item.Volumes = append(item.Volumes, strings.Fields(v)...)
}
}
}