frontend: fail if TEAMS directory doesn't exists

This commit is contained in:
nemunaire 2016-11-19 16:44:26 +01:00
parent 3c84c6194d
commit b4c17876c6

View File

@ -22,7 +22,7 @@ func touchStartedFile(startSub time.Duration) {
log.Println("Started! Go, Go, Go!!") log.Println("Started! Go, Go, Go!!")
fd.Close() fd.Close()
} else { } else {
log.Println("Unable to start challenge:", err) log.Fatal("Unable to start challenge:", err)
} }
} }
@ -34,7 +34,7 @@ func main() {
var denyChName = flag.Bool("denyChName", false, "Deny team to change their name") var denyChName = flag.Bool("denyChName", false, "Deny team to change their name")
var allowRegistration = flag.Bool("allowRegistration", false, "New team can add itself") var allowRegistration = flag.Bool("allowRegistration", false, "New team can add itself")
var resolutionRoute = flag.Bool("resolutionRoute", false, "Enable resolution route") var resolutionRoute = flag.Bool("resolutionRoute", false, "Enable resolution route")
flag.StringVar(&TeamsDir, "teams", "../TEAMS", "Base directory where save teams JSON files") flag.StringVar(&TeamsDir, "teams", "./TEAMS", "Base directory where save teams JSON files")
flag.StringVar(&SubmissionDir, "submission", "./submissions/", "Base directory where save submissions") flag.StringVar(&SubmissionDir, "submission", "./submissions/", "Base directory where save submissions")
flag.Parse() flag.Parse()