Skip to content

Commit d3a5a83

Browse files
Merge pull request #123 from mcode/fix-checklogfile
Improve checking for default log file
2 parents fc9b54a + ad8656d commit d3a5a83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function checkInputAndConfig(config, fromDate, toDate) {
4040

4141
function checkLogFile(pathToLogs) {
4242
// If no custom log file was specified and no default log file exists, create one
43-
if (pathToLogs === path.join('logs', 'run-logs.json') && !fs.existsSync(pathToLogs)) {
43+
if (path.resolve(pathToLogs) === path.resolve(path.join('logs', 'run-logs.json')) && !fs.existsSync(pathToLogs)) {
4444
logger.info(`No log file found. Creating default log file at ${pathToLogs}`);
4545
if (!fs.existsSync('logs')) fs.mkdirSync('logs');
4646
fs.appendFileSync(pathToLogs, '[]');

0 commit comments

Comments
 (0)