Skip to content

Commit

Permalink
fix(info): test if logLocation is writable
Browse files Browse the repository at this point in the history
  • Loading branch information
ZauberNerd authored and hops-release-bot[bot] committed Sep 7, 2021
1 parent f3f7747 commit 9fcc2d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/info/logger/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class Logger {
this.level = logLevels.info;

this.logLocation = process.env.HOPS_LOG_LOCATION;
if (this.logLocation && !accessSync(this.logLocation, constants.W_OK)) {
try {
accessSync(this.logLocation, constants.W_OK);
} catch {
this.logLocation = '';
}

Expand Down

0 comments on commit 9fcc2d0

Please sign in to comment.