mirror of
https://github.com/casbin/bee.git
synced 2025-07-17 04:03:24 +08:00
Adds Windows support for command execution
This commit is contained in:
@ -87,7 +87,8 @@ func (c *customCommand) run() error {
|
|||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "darwin", "linux":
|
case "darwin", "linux":
|
||||||
cmd = exec.Command("sh", "-c", c.Command)
|
cmd = exec.Command("sh", "-c", c.Command)
|
||||||
case "windows": //TODO
|
case "windows":
|
||||||
|
cmd = exec.Command("cmd", "/C", c.Command)
|
||||||
}
|
}
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
Reference in New Issue
Block a user