Wait on exec process not task
Fixes #1449 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
3e2a9c60af
commit
5614e9c7b3
@ -70,7 +70,7 @@ var taskExecCommand = cli.Command{
|
|||||||
}
|
}
|
||||||
defer process.Delete(ctx)
|
defer process.Delete(ctx)
|
||||||
|
|
||||||
statusC, err := task.Wait(ctx)
|
statusC, err := process.Wait(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -83,9 +83,6 @@ var taskExecCommand = cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := process.Start(ctx); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if tty {
|
if tty {
|
||||||
if err := handleConsoleResize(ctx, process, con); err != nil {
|
if err := handleConsoleResize(ctx, process, con); err != nil {
|
||||||
logrus.WithError(err).Error("console resize")
|
logrus.WithError(err).Error("console resize")
|
||||||
@ -94,6 +91,10 @@ var taskExecCommand = cli.Command{
|
|||||||
sigc := forwardAllSignals(ctx, process)
|
sigc := forwardAllSignals(ctx, process)
|
||||||
defer stopCatch(sigc)
|
defer stopCatch(sigc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := process.Start(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
status := <-statusC
|
status := <-statusC
|
||||||
code, _, err := status.Result()
|
code, _, err := status.Result()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user