mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-15 03:24:53 +08:00
fix: Fix the issue of double quote escaping in cronjob (#10519)
This commit is contained in:
parent
e87bf0b3fc
commit
eff55da020
1 changed files with 2 additions and 2 deletions
|
|
@ -147,9 +147,9 @@ func (u *CronjobService) handleShell(cronjob model.Cronjob, taskItem *task.Task)
|
|||
command = cronjob.Command
|
||||
}
|
||||
if len(cronjob.User) != 0 {
|
||||
return cmdMgr.Run("docker", "exec", "-u", cronjob.User, cronjob.ContainerName, command, "-c", strings.ReplaceAll(scriptItem, "\"", "\\\""))
|
||||
return cmdMgr.Run("docker", "exec", "-u", cronjob.User, cronjob.ContainerName, command, "-c", scriptItem)
|
||||
}
|
||||
return cmdMgr.Run("docker", "exec", cronjob.ContainerName, command, "-c", strings.ReplaceAll(scriptItem, "\"", "\\\""))
|
||||
return cmdMgr.Run("docker", "exec", cronjob.ContainerName, command, "-c", scriptItem)
|
||||
}
|
||||
if len(cronjob.Executor) == 0 {
|
||||
cronjob.Executor = "bash"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue