mirror of
https://github.com/Luzifer/streamdeck.git
synced 2024-12-20 17:51:21 +00:00
[exec] Allow waiting for command to finish
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
73162a3dda
commit
4cf347407a
1 changed files with 6 additions and 0 deletions
|
@ -35,5 +35,11 @@ func (actionExec) Execute(attributes map[string]interface{}) error {
|
|||
return errors.Wrap(err, "Unable to start command")
|
||||
}
|
||||
|
||||
// If "wait" is set and set to true start command and wait for execution
|
||||
if v, ok := attributes["wait"].(bool); ok && v {
|
||||
return errors.Wrap(command.Wait(), "Unable to execute command")
|
||||
}
|
||||
|
||||
// We don't wait so we release the process and don't care anymore
|
||||
return errors.Wrap(command.Process.Release(), "Unable to release process")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue