Merge pull request #322 from justinabrahms/patch-1

Fix issue w/ mkdirp race condition
This commit is contained in:
Christian Bundy 2020-03-16 14:46:48 -07:00 committed by GitHub
commit 089291525e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ const targetPath = path.join(systemdUserHome, "oasis.service");
if (fs.existsSync(targetPath)) {
console.log("Cowardly refusing to overwrite file:", targetPath);
} else {
mkdirp(systemdUserHome);
mkdirp.sync(systemdUserHome);
const sourcePath = path.join(__dirname, "oasis.service");
fs.copyFileSync(sourcePath, targetPath);