Create vault dir if doesn't exist

This commit is contained in:
Andras Schmelczer 2025-12-07 15:41:01 +00:00
parent 92b8a966be
commit 8783194ffc

View file

@ -39,6 +39,10 @@ async function main(): Promise<void> {
const args = parseArgs(process.argv);
const absolutePath = path.resolve(args.localPath);
if (!fsSync.existsSync(absolutePath)) {
fsSync.mkdirSync(absolutePath, { recursive: true });
}
try {
const stats = await fs.stat(absolutePath);
if (!stats.isDirectory()) {