--- a/environment/expand.go Mon Oct 11 06:21:30 2021 -0500
+++ b/environment/expand.go Mon Oct 11 06:53:39 2021 -0500
@@ -2,6 +2,8 @@
+ log "github.com/sirupsen/logrus" func (e Environment) expandMapper(name string) string {
@@ -27,7 +29,20 @@
// Expand looks for the given key and returns the value if one is found
// recursing if the value contains another variable.
func (e Environment) Expand(key string) string {
- return os.Expand(key, e.expandMapper)
+ last := os.Expand(key, e.expandMapper) + for i := 0; i < n_tries; i++ { + next := os.Expand(last, e.expandMapper) + log.Warnf("failed to fully expand %q after %d recursions", key, n_tries) func (e Environment) Expandv(items []string) []string {