mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
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>
This commit is contained in:
parent
f36f685aab
commit
360fd52355
1 changed files with 2 additions and 1 deletions
|
@ -267,7 +267,8 @@ func readArgsFile(file string, split bool) []string {
|
||||||
}()
|
}()
|
||||||
scanner := bufio.NewScanner(f)
|
scanner := bufio.NewScanner(f)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
arg := strings.TrimSpace(scanner.Text())
|
arg := os.ExpandEnv(strings.TrimSpace(scanner.Text()))
|
||||||
|
|
||||||
if strings.HasPrefix(arg, "-") && split {
|
if strings.HasPrefix(arg, "-") && split {
|
||||||
args = append(args, regexp.MustCompile(`\s`).Split(arg, 2)...)
|
args = append(args, regexp.MustCompile(`\s`).Split(arg, 2)...)
|
||||||
} else if !split {
|
} else if !split {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue