sync: Allow using challenge.toml instead of challenge.txt

This commit is contained in:
nemunaire 2023-05-05 15:25:20 +02:00
commit 2140939364
4 changed files with 12 additions and 6 deletions

View file

@ -513,7 +513,7 @@ func buildExerciceFlags(i Importer, exercice *fic.Exercice, exceptions *CheckExc
// CheckExerciceFlags checks if all flags for the given challenge are correct.
func CheckExerciceFlags(i Importer, exercice *fic.Exercice, files []string, exceptions *CheckExceptions) (rf []fic.Flag, errs []error) {
exceptions = exceptions.GetFileExceptions("challenge.txt")
exceptions = exceptions.GetFileExceptions("challenge.txt", "challenge.toml")
flags, flagsids, berrs := buildExerciceFlags(i, exercice, exceptions)
errs = append(errs, berrs...)
@ -591,7 +591,7 @@ func SyncExerciceFlags(i Importer, exercice *fic.Exercice, exceptions *CheckExce
} else if _, err := exercice.WipeMCQs(); err != nil {
errs = append(errs, err)
} else {
exceptions = exceptions.GetFileExceptions("challenge.txt")
exceptions = exceptions.GetFileExceptions("challenge.txt", "challenge.toml")
flags, flagids, berrs := buildExerciceFlags(i, exercice, exceptions)
errs = append(errs, berrs...)