From 0806c8b10946de509889eb723aaba45cc100c8de Mon Sep 17 00:00:00 2001 From: raffis Date: Sun, 17 Dec 2023 09:59:13 +0100 Subject: [PATCH] feat: support config env expansion (#2063) Signed-off-by: Raffael Sahli Co-authored-by: ChristopherHX Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 6b84cd76..fe7a130b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -267,7 +267,8 @@ func readArgsFile(file string, split bool) []string { }() scanner := bufio.NewScanner(f) for scanner.Scan() { - arg := strings.TrimSpace(scanner.Text()) + arg := os.ExpandEnv(strings.TrimSpace(scanner.Text())) + if strings.HasPrefix(arg, "-") && split { args = append(args, regexp.MustCompile(`\s`).Split(arg, 2)...) } else if !split {