aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/app/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/app/app.go')
-rw-r--r--cmd/app/app.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/app/app.go b/cmd/app/app.go
index 9fa49696..a8508676 100644
--- a/cmd/app/app.go
+++ b/cmd/app/app.go
@@ -31,7 +31,12 @@ func parsePair(s string) (source, target *check.Absolute, err error) {
// parse decodes a high-level configuration stream and returns its
// corresponding [hst.Config].
-func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
+func parse(
+ id string,
+ base *check.Absolute,
+ r io.Reader,
+ templateP *string,
+) (*hst.Config, error) {
shell := fhs.AbsRoot.Append("bin", "zsh")
home := hst.AbsPrivateTmp.Append("home")
@@ -99,6 +104,9 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
} else if v, err := strconv.Atoi(identity); err != nil {
return nil, err
} else {
+ if templateP != nil {
+ *templateP = template
+ }
c.Identity = v
root.Upper = base.Append("template", template)
}