mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-20 18:57:44 +08:00
Merge pull request #1870 from tianon/invoke-entrypoint-fixes
This commit is contained in:
commit
c30bcade2c
@ -726,6 +726,9 @@ func parseInvokeConfig(invoke string) (cfg invokeConfig, err error) {
|
|||||||
cfg.Cmd = append(cfg.Cmd, value) // TODO: support JSON
|
cfg.Cmd = append(cfg.Cmd, value) // TODO: support JSON
|
||||||
case "entrypoint":
|
case "entrypoint":
|
||||||
cfg.Entrypoint = append(cfg.Entrypoint, value) // TODO: support JSON
|
cfg.Entrypoint = append(cfg.Entrypoint, value) // TODO: support JSON
|
||||||
|
if cfg.Cmd == nil {
|
||||||
|
cfg.Cmd = []string{}
|
||||||
|
}
|
||||||
case "env":
|
case "env":
|
||||||
cfg.Env = append(cfg.Env, value)
|
cfg.Env = append(cfg.Env, value)
|
||||||
case "user":
|
case "user":
|
||||||
|
@ -282,6 +282,7 @@ func (m *monitor) startInvoke(ctx context.Context, pid string, cfg controllerapi
|
|||||||
}
|
}
|
||||||
if len(cfg.Entrypoint) == 0 && len(cfg.Cmd) == 0 {
|
if len(cfg.Entrypoint) == 0 && len(cfg.Cmd) == 0 {
|
||||||
cfg.Entrypoint = []string{"sh"} // launch shell by default
|
cfg.Entrypoint = []string{"sh"} // launch shell by default
|
||||||
|
cfg.Cmd = []string{}
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
// Start a new invoke
|
// Start a new invoke
|
||||||
|
Loading…
x
Reference in New Issue
Block a user