Don't limit the number of replacements in expandVars(...)

This commit is contained in:
Stanislav Fesenko 2024-02-17 13:42:32 +03:00
parent 12f7e25a85
commit e0f154d95c

View File

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