Skip to content

Commit

Permalink
mkdirs FirstRun if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jtzero committed Feb 17, 2024
1 parent 3dc0a95 commit 3b18174
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions first-run.js
Expand Up @@ -42,6 +42,11 @@ function isFirstRun() {
return false;
}

const firstRunFolder = path.dirname(configPath);
if (!fs.existsSync(firstRunFolder)) {
fs.mkdirSync(firstRunFolder);
}

fs.writeFileSync(configPath, '');
} catch (error) {
console.warn(`First run: Unable to write firstRun file`, error);
Expand Down

0 comments on commit 3b18174

Please sign in to comment.