-
-
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: Use the resolved root when setting Glob Root (#6027)
- Loading branch information
Showing
6 changed files
with
32 additions
and
2 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,17 @@ | ||
# Issue 6025 | ||
|
||
See: [#6025](https://github.com/streetsidesoftware/cspell/issues/6025) | ||
|
||
The Glob Root was not getting correctly set: | ||
|
||
Cause: [lint.ts#L406-L409](https://github.com/streetsidesoftware/cspell/pull/6004/files#diff-ef0c79008fac4e61b9dc76115f6847434e3db08e41cc4a8673cf84b35a103306L406-L409) | ||
|
||
```diff | ||
async function run(): Promise<RunResult> { | ||
if (cfg.options.root) { | ||
- process.env[ENV_CSPELL_GLOB_ROOT] = cfg.root; | ||
+ setEnvironmentVariable(ENV_CSPELL_GLOB_ROOT, cfg.options.root); | ||
} | ||
``` | ||
|
||
`cfg.root` has been resolved, while `cfg.options.root` is still relative. |
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 changes: 4 additions & 0 deletions
4
packages/cspell/fixtures/issue-6025/nested/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 @@ | ||
overrides: | ||
- filename: sample/getting_started.md | ||
words: | ||
- funcignore |
5 changes: 5 additions & 0 deletions
5
packages/cspell/fixtures/issue-6025/sample/getting_started.md
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,5 @@ | ||
# Getting Started | ||
|
||
``` | ||
funcignore | ||
``` |
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