This commit is contained in:
parent
da941d82b8
commit
db0c4f1af0
1 changed files with 4 additions and 1 deletions
5
cli.go
5
cli.go
|
@ -8,12 +8,15 @@ import (
|
||||||
|
|
||||||
"gitea.nulo.in/Nulo/repro-run/runner"
|
"gitea.nulo.in/Nulo/repro-run/runner"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
"golang.org/x/exp/slices"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
config, err := readConfig()
|
config, err := readConfig()
|
||||||
must(err)
|
must(err)
|
||||||
|
|
||||||
|
dontDeleteTemp := slices.Contains(os.Args, "--dont-delete-temp")
|
||||||
|
|
||||||
env, err := godotenv.Read()
|
env, err := godotenv.Read()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Couldn't load env file: %v", err)
|
log.Printf("Couldn't load env file: %v", err)
|
||||||
|
@ -22,7 +25,7 @@ func main() {
|
||||||
env[k] = strings.ReplaceAll(v, "\\n", "\n")
|
env[k] = strings.ReplaceAll(v, "\\n", "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
must(runner.Run(config, "rootfs/", "cache/", ".", nil, false, env))
|
must(runner.Run(config, "rootfs/", "cache/", ".", nil, dontDeleteTemp, env))
|
||||||
}
|
}
|
||||||
|
|
||||||
func must(err error, where ...string) {
|
func must(err error, where ...string) {
|
||||||
|
|
Loading…
Reference in a new issue