Skip to content

Commit 1c3c248

Browse files
authored
mkdirs FirstRun if it doesn't exist (#781)
1 parent accaa45 commit 1c3c248

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

first-run.js

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ function isFirstRun() {
4242
return false;
4343
}
4444

45+
const firstRunFolder = path.dirname(configPath);
46+
if (!fs.existsSync(firstRunFolder)) {
47+
fs.mkdirSync(firstRunFolder);
48+
}
49+
4550
fs.writeFileSync(configPath, '');
4651
} catch (error) {
4752
console.warn(`First run: Unable to write firstRun file`, error);

0 commit comments

Comments
 (0)