sync: Prefer challenge.toml over challenge.txt
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b5065df4c3
commit
651d428223
7 changed files with 16 additions and 16 deletions
|
@ -73,7 +73,7 @@ func main() {
|
|||
func treatDir(p string) {
|
||||
var expath string
|
||||
|
||||
for _, f := range []string{"challenge.txt", "challenge.toml"} {
|
||||
for _, f := range []string{"challenge.toml", "challenge.txt"} {
|
||||
if sync.GlobalImporter.Exists(path.Join(p, f)) {
|
||||
expath = p
|
||||
break
|
||||
|
@ -108,7 +108,7 @@ func treatExercice(expath string) {
|
|||
|
||||
paramsFiles, err := sync.GetExerciceFilesParams(sync.GlobalImporter, exercice)
|
||||
if err != nil {
|
||||
log.Printf("Unable to read challenge.txt %q: %s", expath, err.Error())
|
||||
log.Printf("Unable to read challenge.toml %q: %s", expath, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -106,9 +106,9 @@ func NewChallengeTxtError(exercice *fic.Exercice, line uint, err error, theme ..
|
|||
|
||||