Merge pull request #1459 from crosbymichael/exec-wait
Wait on exec process not task
This commit is contained in:
commit
a3f0bbaac1
@ -70,7 +70,7 @@ var taskExecCommand = cli.Command{
|
||||
}
|
||||
defer process.Delete(ctx)
|
||||
|
||||
statusC, err := task.Wait(ctx)
|
||||
statusC, err := process.Wait(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -83,9 +83,6 @@ var taskExecCommand = cli.Command{
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := process.Start(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
if tty {
|
||||
if err := handleConsoleResize(ctx, process, con); err != nil {
|
||||
logrus.WithError(err).Error("console resize")
|
||||
@ -94,6 +91,10 @@ var taskExecCommand = cli.Command{
|
||||
sigc := forwardAllSignals(ctx, process)
|
||||
defer stopCatch(sigc)
|
||||
}
|
||||
|
||||
if err := process.Start(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
status := <-statusC
|
||||
code, _, err := status.Result()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user