Skip to content

Commit

Permalink
fix(public/write): fixes directory ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed May 12, 2019
1 parent e1a9d43 commit f6d1e69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/public/fs/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function write(file: string, ...args: any[]): () => Promise<void> {

if (!(await confirm(`Write "${relative}"?`, options))) return;

await fs.ensureDir(file);
await fs.ensureDir(path.parse(file).dir);
await fs.writeFile(file, String(raw));
logger.info(`Written: ${relative}`);
};
Expand Down

0 comments on commit f6d1e69

Please sign in to comment.