cli: poder no borrar temp
repro-run Corre repro-run.json Details

This commit is contained in:
Cat /dev/Nulo 2023-01-30 16:01:29 -03:00
parent da941d82b8
commit db0c4f1af0
1 changed files with 4 additions and 1 deletions

5
cli.go
View File

@ -8,12 +8,15 @@ import (
"gitea.nulo.in/Nulo/repro-run/runner"
"github.com/joho/godotenv"
"golang.org/x/exp/slices"
)
func main() {
config, err := readConfig()
must(err)
dontDeleteTemp := slices.Contains(os.Args, "--dont-delete-temp")
env, err := godotenv.Read()
if err != nil {
log.Printf("Couldn't load env file: %v", err)
@ -22,7 +25,7 @@ func main() {
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) {