Skip to content

Extension adds all parent directories to watcher (up to root) #701

Closed
merrickluo/lsp-tailwindcss
#53
@ikapo

Description

@ikapo

What version of Tailwind CSS IntelliSense are you using?

v0.9.6

What version of Tailwind CSS are you using?

v3.2.4

What package manager are you using?
npm
What operating system are you using?

For example: macOS, Windows

macOS

Tailwind config

N/A (no changes to default)

VS Code settings

N/A

Describe your issue
Whenever the extension starts, I get a Error: EBADF: bad file descriptor, lstat '/dev/fd/{some number}'
I have traced this back to packages/tailwindcss-language-server/src/server.ts:353.
The while loop causes all parent directories to be added, all the way up to / (root).
The variable temp there is never assigned, so it runs until the last parent dir.
I wouldn't mind opening a PR to fix this, but what should be the last directory is goes up to? projectConfig.configPath?
git rev-parse --show-toplevel (current git root)? Maybe uppermost package.json?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions