mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-20 10:29:50 +00:00
art: Drop provider from c3os code
Part of: https://github.com/c3os-io/c3os/issues/68
This commit is contained in:
18
sdk/bus/hooks.go
Normal file
18
sdk/bus/hooks.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package bus
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func RunHookScript(s string) error {
|
||||
_, err := os.Stat(s)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
cmd := exec.Command(s)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Stdin = os.Stdin
|
||||
return cmd.Run()
|
||||
}
|
Reference in New Issue
Block a user