Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions core/util/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export function getConfigYamlPath(ideType?: IdeType): string {
// https://github.com/continuedev/continue/pull/7224
// This was here because we had different context provider support between jetbrains and vs code
// Leaving so we could differentiate later but for now configs are the same between IDEs
fs.writeFileSync(p, YAML.stringify(defaultConfig));
fs.writeFileSync(p, YAML.stringify(defaultConfig), { mode: 0o600 });
} else {
fs.writeFileSync(p, YAML.stringify(defaultConfig));
fs.writeFileSync(p, YAML.stringify(defaultConfig), { mode: 0o600 });
}
}
return p;
Expand Down Expand Up @@ -260,7 +260,9 @@ function editConfigYaml(callback: (config: ConfigYaml) => ConfigYaml): void {
// Check if it's an object
if (typeof configYaml === "object" && configYaml !== null) {
configYaml = callback(configYaml as any) as any;
fs.writeFileSync(getConfigYamlPath(), YAML.stringify(configYaml));
fs.writeFileSync(getConfigYamlPath(), YAML.stringify(configYaml), {
mode: 0o600,
});
} else {
console.warn("config.yaml is not a valid object");
}
Expand Down
4 changes: 3 additions & 1 deletion extensions/vscode/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ const getCommandsMap: (
const configYaml = convertJsonToYamlConfig(parsed);

const configYamlPath = getConfigYamlPath();
fs.writeFileSync(configYamlPath, YAML.stringify(configYaml));
fs.writeFileSync(configYamlPath, YAML.stringify(configYaml), {
mode: 0o600,
});

// Open config.yaml
await openEditorAndRevealRange(
Expand Down
Loading