Skip to content

Commit df619bf

Browse files
ssbarneaevidolob
authored andcommitted
Fix runtime warning on configuration loading
Avoid an warning message as: [exthost] [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource.
1 parent 77c8e7b commit df619bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ export const getDocUri = (p: string): vscode.Uri => {
4444
};
4545

4646
export const updateSettings = (setting: string, value: unknown): Thenable<void> => {
47-
const yamlConfiguration = vscode.workspace.getConfiguration('yaml');
47+
const yamlConfiguration = vscode.workspace.getConfiguration('yaml', null);
4848
return yamlConfiguration.update(setting, value, false);
4949
};
5050

5151
export const resetSettings = (setting: string, value: unknown): Thenable<void> => {
52-
const yamlConfiguration = vscode.workspace.getConfiguration('yaml');
52+
const yamlConfiguration = vscode.workspace.getConfiguration('yaml', null);
5353
return yamlConfiguration.update(setting, value, false);
5454
};
5555

0 commit comments

Comments
 (0)