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"
|
||||
"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) {
|
||||
|
|
Loading…
Reference in a new issue