diff options
author | raffis <raffael.sahli@doodle.com> | 2023-12-17 09:59:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 09:59:13 +0100 |
commit | 0806c8b10946de509889eb723aaba45cc100c8de (patch) | |
tree | 34772920763c2cf556efd8d9f62ba89ef6253ddb /cmd | |
parent | build(deps): bump actions/checkout from 3 to 4 (#1998) (diff) | |
download | forgejo-act-0806c8b10946de509889eb723aaba45cc100c8de.tar.xz forgejo-act-0806c8b10946de509889eb723aaba45cc100c8de.zip |
feat: support config env expansion (#2063)
Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/root.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/root.go b/cmd/root.go index 6b84cd7..fe7a130 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 { |