Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "lory", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "bin": "src/index.js", |
@@ -18,5 +18,3 @@ const path = require('path'); | ||
state.serversDir = path.resolve(state.dir, 'server'); | ||
if (!await file.fileExists(state.serversDir)) { | ||
await fs.promises.mkdir(serverDir); | ||
} | ||
await file.createDirOrIgnore(state.serversDir); | ||
@@ -32,5 +30,3 @@ const servers = typeof state.servers === 'string' ? [state.servers] : state.servers; | ||
state.mountsDir = path.resolve(state.dir, 'mounts'); | ||
if (!await file.fileExists(state.mountsDir)) { | ||
await fs.promises.mkdir(state.mountsDir); | ||
} | ||
await file.createDirOrIgnore(state.mountsDir); | ||
@@ -37,0 +33,0 @@ state.mounts = [ |
const fs = require('fs'); | ||
const util = require('util'); | ||
module.exports.fileExists = util.promisify(fs.exists); | ||
const fileExists = module.exports.fileExists = util.promisify(fs.exists); | ||
module.exports.createDirOrIgnore = async dir => { | ||
if (!await fileExists(dir)) { | ||
await fs.promises.mkdir(dir); | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
334
12115