filebrowser/utils/commands/commands.go

16 lines
267 B
Go
Raw Normal View History

2016-06-28 13:59:33 +00:00
package commands
import (
"os"
"os/exec"
)
// Run executes an external command
func Run(command string, args []string, path string) error {
cmd := exec.Command(command, args...)
cmd.Dir = path
2016-06-29 13:57:40 +00:00
cmd.Stdout = os.Stdout
2016-06-28 13:59:33 +00:00
cmd.Stderr = os.Stderr
return cmd.Run()
}