From 39af6359be6f539b9bfac035514dce6f8ee399ce Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 5 Aug 2021 01:12:40 -0400 Subject: [PATCH] feat: add a Start() helper function --- plugins/common/subprocess.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/common/subprocess.go b/plugins/common/subprocess.go index f7da71901..2f970474d 100644 --- a/plugins/common/subprocess.go +++ b/plugins/common/subprocess.go @@ -61,6 +61,13 @@ func (sc *ShellCmd) Execute() bool { return true } +// Start is a wrapper around exec.Command.Start() +func (sc *ShellCmd) Start() error { + sc.setup() + + return sc.Command.Start() +} + // Output is a lightweight wrapper around exec.Command.Output() func (sc *ShellCmd) Output() ([]byte, error) { sc.setup()