Skip to content

Commit c6add45

Browse files
committed
fix glint wsl
1 parent b9b6fa9 commit c6add45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/kotlin/com/emberjs/glint/GlintLspSupportProvider.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
9393
}
9494
val glintPkg = workingDir.findFileByRelativePath("node_modules/@glint/core") ?: return false
9595
glintPkg.findFileByRelativePath("bin/glint-language-server.js") ?: return false
96+
glintCoreDir = glintPkg
9697
return true
9798
}
9899

@@ -105,7 +106,8 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
105106
pkg.readOrDetect()
106107
val path = pkg.`package`.constantPackage?.systemIndependentPath
107108
if (path != null) {
108-
val f = VfsUtil.findFile(Path(path), true)
109+
var f = VfsUtil.findFile(Path(path), true)
110+
f = f?.findFileByRelativePath("bin/glint-language-server.js")
109111

110112
if (f != null && f.exists()) {
111113
return true
@@ -150,7 +152,6 @@ class GlintLspServerDescriptor(private val myProject: Project) : LspServerDescri
150152
val pkg = config.getPackage()
151153
var path = pkg.`package`.constantPackage?.systemIndependentPath
152154
val dir = glintCoreDir ?: VfsUtil.findFile(Path(path!!), true)
153-
this.isWsl = false
154155

155156
var workDirectory = dir
156157
while (workDirectory != null && workDirectory.path.contains("node_modules")) {

0 commit comments

Comments
 (0)