mirror of
https://github.com/clearlinux/rkt.git
synced 2026-11-25 21:42:50 +00:00
Merge pull request #585 from vcaputo/sysd-exec-double-dollars
stage1/init: escape $'s in exec arguments by doubling them
This commit is contained in:
@@ -99,6 +99,7 @@ func quoteExec(exec []string) string {
|
||||
escArg := strings.Replace(arg, `\`, `\\`, -1)
|
||||
escArg = strings.Replace(escArg, `"`, `\"`, -1)
|
||||
escArg = strings.Replace(escArg, `'`, `\'`, -1)
|
||||
escArg = strings.Replace(escArg, `$`, `$$`, -1)
|
||||
qexec = append(qexec, `"`+escArg+`"`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user