impr: unlimited replacements when expanding command vars (#8)

This commit is contained in:
Stanislav Fesenko
2024-02-20 09:30:22 +03:00
committed by GitHub
parent 4218065e0e
commit cc3567f26e
2 changed files with 4 additions and 3 deletions

View File

@@ -323,7 +323,7 @@ func expandVars(command []string, name string) []string {
expanded := make([]string, len(command))
copy(expanded, command)
for i, cmd := range expanded {
expanded[i] = strings.Replace(cmd, ":name", name, 1)
expanded[i] = strings.Replace(cmd, ":name", name, -1)
}
return expanded
}