Skip to content

Commit

Permalink
#827 - Fix team settings file recreation
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Jun 27, 2024
1 parent bd1fc32 commit 0e6e776
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

### 🐞 Fixes

- [#827](https://github.com/estruyf/vscode-front-matter/issues/827): Fix for `frontmatter.json` file which gets created when already present in a sub-folder

## [10.2.0] - 2024-06-12 - [Release notes](https://beta.frontmatter.codes/updates/v10.2.0)

### ✨ New features
Expand Down
4 changes: 3 additions & 1 deletion src/helpers/SettingsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ ${JSON.stringify(value, null, 2)}`,
}frontmatter.codes/frontmatter.schema.json`
};

if (wsFolder) {
const projectFile = await Settings.projectConfigPath();

if (wsFolder && !projectFile) {
const configPath = join(wsFolder.fsPath, Settings.globalFile);
if (!(await existsAsync(configPath))) {
await writeFileAsync(configPath, JSON.stringify(initialConfig, null, 2), 'utf8');
Expand Down

0 comments on commit 0e6e776

Please sign in to comment.