mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 04:10:01 +00:00
fix(core): Create instance settings directory recursively (no-changelog) (#7506)
This commit is contained in:
committed by
GitHub
parent
a739245332
commit
8ff9f97493
@@ -63,10 +63,11 @@ export class InstanceSettings {
|
||||
errorMessage: `Error parsing n8n-config file "${settingsFile}". It does not seem to be valid JSON.`,
|
||||
});
|
||||
} else {
|
||||
// Ensure that the `.n8n` folder exists
|
||||
mkdirSync(this.n8nFolder, { recursive: true });
|
||||
// If file doesn't exist, create new settings
|
||||
const encryptionKey = process.env.N8N_ENCRYPTION_KEY ?? randomBytes(24).toString('base64');
|
||||
settings = { encryptionKey };
|
||||
mkdirSync(path.dirname(settingsFile));
|
||||
this.save(settings);
|
||||
// console.info(`UserSettings were generated and saved to: ${settingsFile}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user