Browse Source

Fix allowed non-CONSOLE docs on windows

`\` vs `/` strikes again. This time I just convert all the `\` into
`/`. It isn't perfect but anyone who sees it'll figure out what is
up.
Nik Everett 9 years ago
parent
commit
9fd42d1d48

+ 2 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy

@@ -133,7 +133,8 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
          */
         void handleSnippet(Snippet snippet) {
             if (RestTestsFromSnippetsTask.isConsoleCandidate(snippet)) {
-                unconvertedCandidates.add(snippet.path.toString())
+                unconvertedCandidates.add(snippet.path.toString()
+                    .replace('\\', '/'))
             }
             if (BAD_LANGUAGES.contains(snippet.language)) {
                 throw new InvalidUserDataException(