Skip to content

Commit fbae8c9

Browse files
committed
Check for filesystem root and bail
1 parent 41bd9ce commit fbae8c9

File tree

1 file changed

+7
-0
lines changed
  • packages/tailwindcss-language-server/src

1 file changed

+7
-0
lines changed

packages/tailwindcss-language-server/src/tw.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ export class TW {
130130
return false
131131
}
132132

133+
if (uri.fsPath === '/' || uri.fsPath === '\\\\') {
134+
console.warn(
135+
`The workspace folder [${uri.toString()}] will be ignored: it starts at the root of the filesystem which is most likely an error.`,
136+
)
137+
return false
138+
}
139+
133140
return true
134141
}
135142

0 commit comments

Comments
 (0)