1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
diff --git a/registry/prompt.go b/registry/prompt.go
index b683205df5a629705312d4ad1b5063a3af76ee8d..dfa47cecf78e26359c0cb42b4eb4057421f4a77e 100644
--- a/registry/prompt.go
+++ b/registry/prompt.go
@@ -2,6 +2,7 @@ package registry
import (
"fmt"
+ "io/ioutil"
"os"
"path/filepath"
"sort"
@@ -25,7 +26,15 @@ if _, err := os.Lstat(templatePath); err != nil {
return nil, err
}
- tree, err := toml.LoadFile(templatePath)
+ templateBytes, err := ioutil.ReadFile(templatePath)
+ if err != nil {
+ return nil, err
+ }
+
+ // Expand the template with environment variables
+ templateContents := os.ExpandEnv(string(templateBytes))
+
+ tree, err := toml.Load(templateContents)
if err != nil {
return nil, err
}
|