mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-17 16:34:42 -05:00
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:
@@ -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)...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user