sync: Allow using challenge.toml instead of challenge.txt
This commit is contained in:
parent
20c41ec573
commit
2140939364
4 changed files with 12 additions and 6 deletions
|
|
@ -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...)
|
||||
|
|
|
|||
Reference in a new issue