sparkles: Minor enhancements (#239)

* 🐛 Fixup grub option quoting

* ⚙️ Copy discovery to oem if found

*  Add environment block to install

* ⚙️ Use /oem for mount in kcrypt post-hook

* 📝 Update docs with installer env reference

* 🤖 Add test deps

* ⚙️ Be consistent and set env also for post-hooks

* ⚙️ propagate env in post-hooks
This commit is contained in:
Ettore Di Giacinto 2022-10-18 07:45:07 +02:00 committed by Itxaka
parent 5d8fd9e044
commit e0f54f296e
2 changed files with 12 additions and 8 deletions

View File

@ -18,13 +18,15 @@ import (
)
type Install struct {
Auto bool `yaml:"auto,omitempty"`
Reboot bool `yaml:"reboot,omitempty"`
Device string `yaml:"device,omitempty"`
Poweroff bool `yaml:"poweroff,omitempty"`
GrubOptions map[string]string `yaml:"grub_options,omitempty"`
Bundles Bundles `yaml:"bundles,omitempty"`
Encrypt []string `yaml:"encrypted_partitions,omitempty"`
Auto bool `yaml:"auto,omitempty"`
Reboot bool `yaml:"reboot,omitempty"`
Device string `yaml:"device,omitempty"`
Poweroff bool `yaml:"poweroff,omitempty"`
GrubOptions map[string]string `yaml:"grub_options,omitempty"`
Bundles Bundles `yaml:"bundles,omitempty"`
Encrypt []string `yaml:"encrypted_partitions,omitempty"`
SkipEncryptCopyPlugins bool `yaml:"skip_copy_kcrypt_plugin,omitempty"`
Env []string `yaml:"env,omitempty"`
}
type Config struct {

View File

@ -10,7 +10,9 @@ import (
)
func SH(c string) (string, error) {
o, err := exec.Command("/bin/sh", "-c", c).CombinedOutput()
cmd := exec.Command("/bin/sh", "-c", c)
cmd.Env = os.Environ()
o, err := cmd.CombinedOutput()
return string(o), err
}