-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
area:cliIssues with Prettier's Command Line InterfaceIssues with Prettier's Command Line Interfacelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Environments:
- Prettier Version: 2.5.1
- Running Prettier via: CLI
- Runtime: Node.js v16.13.0
- Operating System: Linux
- Prettier plugins (if any): none
Steps to reproduce:
First create the test dirs.
mkdir -p ./x1 ./y1
ln -sf .. ./x1/x2
ln -sf .. ./y1/y2It should look like:
$ tree
.
├── x1
│ └── x2 -> ..
└── y1
└── y2 -> ..
4 directories, 0 files
Then run prettier cli
prettier -c .
Try adding these dirs to .prettierignore and run again:
$ cat .prettierignore
x1
y1
Expected behavior:
No error.
Or these problematic dirs can be excluded by .prettierignore file.
Actual behavior:
The command will run for a long time, and then produce an error.
[error] Unable to expand directory: .
[error] ELOOP: too many symbolic links encountered, scandir '/tmp/t/prettier-bug/x1/x2/x1/x2/x1/x2/x1/x2/x1/x2/y1/y2/y1/y2/x1/x2/y1/y2/x1/x2/y1/y2/y1/y2/x1/x2/x1/x2/y1/y2/y1/y2/x1/x2/y1/y2/x1/x2/x1/x2/x1/x2'
aminya, thielepaul, tiagobento and dc0d
Metadata
Metadata
Assignees
Labels
area:cliIssues with Prettier's Command Line InterfaceIssues with Prettier's Command Line Interfacelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.