mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
3bb3fdb956
Former-commit-id: bbc11e551ed79fc41af61d67bfb9a882dfc8e655 [formerly 4ef42ee3251bdf613b7e24b50692629fbf8965ed] [formerly 10abcd7f0e34753069a80a683df94084f03fdb4b [formerly 1d4cbd622c
]]
Former-commit-id: 7ac0c18ad61cd491f22b906e1efd87892d729cb2 [formerly b45c7e312058490ae90c8162e6cc1264613a9126]
Former-commit-id: 1c7e8ebd2f1b1dc5bd25df9f30a77c9b73ccad4d
20 lines
321 B
Go
20 lines
321 B
Go
package staticgen
|
|
|
|
import (
|
|
"errors"
|
|
"os/exec"
|
|
)
|
|
|
|
// runCommand executes an external command
|
|
func runCommand(command string, args []string, path string) error {
|
|
cmd := exec.Command(command, args...)
|
|
cmd.Dir = path
|
|
out, err := cmd.CombinedOutput()
|
|
|
|
if err != nil {
|
|
return errors.New(string(out))
|
|
}
|
|
|
|
return nil
|
|
}
|