Skip to content

Commit

Permalink
fix: Include root path in boot failure messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jezhiggins committed Jul 22, 2020
1 parent 096d22f commit c0b9fc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/components/services/localfilestorage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function configuredRootPath (options) {
const rootPath = fromConfig || fromEnv
if (!rootPath) bootOops(`Could not configure root path from ${configKey} or TYMLY_LOCALSTORAGE_ROOTPATH.`)
if (!path.isAbsolute(rootPath)) bootOops('Configured root path is relative. It must be absolute.')
if (!fs.existsSync(rootPath)) bootOops('Configured root path does not exist.')
if (!fs.existsSync(rootPath)) bootOops(`Configured root path does not exist - ${rootPath}`)

checkAccess(rootPath, fs.constants.R_OK, 'readable')
checkAccess(rootPath, fs.constants.W_OK, 'writable')
Expand All @@ -117,7 +117,7 @@ function checkAccess (rootPath, flag, actionName) {
try {
fs.accessSync(rootPath, flag)
} catch (e) {
bootOops(`Configured root path exists but is not ${actionName}.`)
bootOops(`Configured root path exists but is not ${actionName} - ${rootPath}`)
}
} // checkAccess

Expand Down

0 comments on commit c0b9fc5

Please sign in to comment.