We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ab1c6b commit 4c864d1Copy full SHA for 4c864d1
1 file changed
src/main/kotlin/com/github/lppedd/cc/configuration/CCTokensService.kt
@@ -191,7 +191,7 @@ internal class CCTokensService(private val project: Project) {
191
}
192
193
private fun findFileUnderProjectRoot(fileName: String, createIfNotExists: Boolean = false): VirtualFile? {
194
- val rootDir = project.findRootDir() ?: error("Expected a project root directory")
+ val rootDir = project.findRootDir() ?: return null // Avoid throwing as otherwise buildSearchableOptions fails
195
var file = rootDir.findChild(fileName)
196
197
if (file?.isValid == true) {
0 commit comments