We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d94d743 commit 538d88dCopy full SHA for 538d88d
lib/file.js
@@ -14,7 +14,7 @@ exports.appendFile = function(file, content) {
14
15
exports.writeFile = function(file, content) {
16
const parts = path.parse(file);
17
- if (!fs.existsSync(parts.dir)) {
+ if (parts.dir !== '' && !fs.existsSync(parts.dir)) {
18
fs.mkdirSync(parts.dir, { recursive: true });
19
}
20
// TODO(joyeecheung): what if the file is a dir?
0 commit comments