2019-10-25 14:58:59 +02:00
|
|
|
package cmd
|
|
|
|
|
2019-11-19 14:29:53 +01:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
2020-02-12 10:12:58 +01:00
|
|
|
type runner interface {
|
2019-10-25 14:58:59 +02:00
|
|
|
Dir(d string)
|
2019-11-19 14:29:53 +01:00
|
|
|
Stdout(out io.Writer)
|
|
|
|
Stderr(err io.Writer)
|
2019-10-25 14:58:59 +02:00
|
|
|
}
|
2019-10-30 09:52:41 +01:00
|
|
|
|
2020-02-12 10:12:58 +01:00
|
|
|
type execRunner interface {
|
|
|
|
runner
|
|
|
|
RunExecutable(e string, p ...string) error
|
|
|
|
}
|
|
|
|
|
2020-01-24 14:30:27 +01:00
|
|
|
type envExecRunner interface {
|
2020-01-29 14:22:43 +01:00
|
|
|
execRunner
|
2020-01-24 14:30:27 +01:00
|
|
|
Env(e []string)
|
|
|
|
}
|
|
|
|
|
2019-10-30 09:52:41 +01:00
|
|
|
type shellRunner interface {
|
2020-02-12 10:12:58 +01:00
|
|
|
runner
|
2019-10-30 09:52:41 +01:00
|
|
|
RunShell(s string, c string) error
|
|
|
|
}
|