Skip to content

Commit

Permalink
fix(fileRepository): create repositoryPath if not exists (#8909)
Browse files Browse the repository at this point in the history
  • Loading branch information
johancube authored Nov 4, 2024
1 parent 78a5fc3 commit 4153e4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cubejs-backend-shared/src/FileRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export class FileRepository implements SchemaFileRepository {
let files: string[] = [];

try {
files = await fs.readdir(path.join(this.localPath(), dir));
const fullPath = path.join(this.localPath(), dir);
await fs.ensureDir(fullPath);
files = await fs.readdir(fullPath);
} catch (e) {
throw new Error(`Model files not found. Please make sure the "${this.repositoryPath}" directory exists and contains model files.`);
}
Expand Down

0 comments on commit 4153e4d

Please sign in to comment.