Skip to content

Commit

Permalink
more config file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
asinbow committed Aug 23, 2023
1 parent 6181c84 commit 32d5ff0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MirrordConfigAPI(private val service: MirrordProjectService) {
fun getDefaultConfig(): VirtualFile? {
return getMirrordDir()
?.children
?.filter { it.name.endsWith("mirrord.json") }
?.filter { it.name.endsWith("mirrord.json") || it.name.endsWith("mirrord.yaml") || it.name.endsWith("mirrord.toml") }
?.minByOrNull { it.name }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ class MirrordConfigIndex : ScalarIndexExtension<String>() {

override fun getInputFilter(): FileBasedIndex.InputFilter {
return FileBasedIndex.InputFilter {
it.isInLocalFileSystem && !it.isDirectory && it.path.endsWith("mirrord.json")
it.isInLocalFileSystem && !it.isDirectory && (
it.path.endsWith("mirrord.json") ||
it.path.endsWith("mirrord.yaml") ||
it.path.endsWith("mirrord.toml")
)
}
}

Expand Down

0 comments on commit 32d5ff0

Please sign in to comment.