mirror of
https://github.com/LukeHagar/sailpoint-cli.git
synced 2025-12-06 12:47:44 +00:00
21 lines
499 B
Go
21 lines
499 B
Go
// Copyright (c) 2021, SailPoint Technologies, Inc. All rights reserved.
|
|
|
|
//go:build windows
|
|
// +build windows
|
|
|
|
package util
|
|
|
|
import (
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
// ExecCommand runs commands on windows environment with CREATE_NEW_PROCESS_GROUP flag,
|
|
// equivalent to Setpgid in linux like environment
|
|
func ExecCommand(name string, arg ...string) error {
|
|
cmd := exec.Command(name, arg...)
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP}
|
|
|
|
return cmd.Start()
|
|
}
|