-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle symbolic links to config files (#5122)
- Loading branch information
Showing
13 changed files
with
146 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cities.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.config-actual |
4 changes: 4 additions & 0 deletions
4
test-fixtures/issues/issue-5120/.config-actual/cspell.config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
words: | ||
- sampleword | ||
- somenewword | ||
- Sonoma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
### Kind of Issue | ||
|
||
Runtime - command-line tools | ||
|
||
### Tool or Library | ||
|
||
cspell | ||
|
||
### Version | ||
|
||
8.2.3 | ||
|
||
### Supporting Library | ||
|
||
Not sure | ||
|
||
### OS | ||
|
||
Macos | ||
|
||
### OS Version | ||
|
||
Sonoma 14.2.1 | ||
|
||
### Description | ||
|
||
cspell does not automatically read a configuration file if it is a symlink. | ||
|
||
### Steps to Reproduce | ||
|
||
1. Define `somenewword` in a simple config file: `cspell.yaml` | ||
2. Confirm it works: `cspell trace somenewword` | ||
3. Rename it: `mv cspell.yaml actual.yaml` | ||
4. Create a symlink to it: `ln -s actual.yaml cspell.yaml` | ||
5. Try using it implicitly: `cspell trace somenewword`. **The config is not loaded.** | ||
6. Use it explicitly: `cspell trace somenewword --config cspell.yaml`. The config is loaded. | ||
|
||
### Expected Behavior | ||
|
||
cspell finds and reads `cspell.yaml` no matter whether it is a symlink or an actual file. | ||
|
||
### Additional Information | ||
|
||
_No response_ | ||
|
||
### cspell.json | ||
|
||
_No response_ | ||
|
||
### cspell.config.yaml | ||
|
||
```yml | ||
words: | ||
- somenewword | ||
``` | ||
### Example Repository | ||
_No response_ | ||
### Code of Conduct | ||
- [X] I agree to follow this project's Code of Conduct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Nested example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import: | ||
- ../.config/cspell-imports.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cspell.actual.yaml |