Skip to content

Commit

Permalink
Merge pull request caprover#2234 from dshook/goaccess-fixes
Browse files Browse the repository at this point in the history
Goaccess fixes
  • Loading branch information
githubsaturn authored Jan 6, 2025
2 parents 584dbd5 + ce0911e commit 44751c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routes/user/system/SystemRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ router.get('/goaccess/:appName/files', async function (req, res, next) {
})
.then(function (data) {
appDefinition = data
return fs.readdir(directoryPath)
return fs.readdir(directoryPath).catch((e) => {
Logger.d('No goaccess logs found')
return []
})
})
.then(function (files) {
return Promise.all(
Expand Down
3 changes: 3 additions & 0 deletions src/user/system/CaptainManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ class CaptainManager {
.then(function () {
return fs.ensureFile(CaptainConstants.baseNginxConfigPath)
})
.then(function () {
return fs.ensureDir(CaptainConstants.nginxSharedLogsPathOnHost)
})
.then(function () {
return fs.ensureDir(CaptainConstants.registryPathOnHost)
})
Expand Down

0 comments on commit 44751c2

Please sign in to comment.