Skip to content

Commit

Permalink
Fix WorkingDirectory on ExUnit Test producer for Umbrella
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsegallafa committed Sep 24, 2021
1 parent 4019ce8 commit 0b90d6d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/org/elixir_lang/exunit/configuration/Producer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ private fun setupConfigurationFromContextImpl(configuration: Configuration,
}

private fun workingDirectory(directory: PsiDirectory, basePath: String?): String? =
if (directory.findFile("mix.exs") != null) {
directory.virtualFile.path
} else {
directory.parent?.let { workingDirectory(it, basePath) } ?: basePath
}
directory.parent?.let { workingDirectory(it, basePath) } ?: basePath

private fun workingDirectory(element: PsiElement, basePath: String?): String? =
when (element) {
Expand Down

0 comments on commit 0b90d6d

Please sign in to comment.