mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 04:55:30 +03:00
fix: logs folder doesn't exist (#3759)
This commit is contained in:
parent
3c89a97a9f
commit
9799326533
@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { existsSync } from 'fs';
|
||||
import fs from 'fs/promises';
|
||||
|
||||
import { WorkspaceSyncStorage } from 'src/workspace/workspace-sync-metadata/storage/workspace-sync.storage';
|
||||
@ -13,6 +14,11 @@ export class WorkspaceLogsService {
|
||||
storage: WorkspaceSyncStorage,
|
||||
workspaceMigrations: WorkspaceMigrationEntity[],
|
||||
) {
|
||||
// Check if `logs` folder exists
|
||||
if (existsSync('./logs') === false) {
|
||||
await fs.mkdir('./logs', { recursive: true });
|
||||
}
|
||||
|
||||
// Save workspace migrations
|
||||
await fs.writeFile(
|
||||
'./logs/workspace-migrations.json',
|
||||
|
Loading…
Reference in New Issue
Block a user