Skip to content

Conversation

@dmendelowitz
Copy link
Contributor

Summary

Previously, the check for the default log file used a strict equality looking for the value /logs/run-logs.json, but now the paths compared will be resolved to allow for different but functionally equivalent paths like ./logs/run-logs.json or ../mcode-extraction-framwork/logs/run-logs.json, etc.

New behavior

The checkLogFile() function in app.js now uses resolved paths to check for the default log file.

Code changes

checkLogFile() in app.js updated with the change described above

Testing guidance

To test this, starting with no default log file, the following commands should produce the same logs folder and file in the default location:

  • npm start -- -e -f 01-01-2019 -t 01-01-2021 -r ../mcode-extraction-framework/logs/run-logs.json
  • npm start -- -e -f 01-01-2019 -t 01-01-2021

Copy link
Contributor

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me! I tested in a similar case to where this was first discovered, and that seemed to be resolved (🥁) as well.

@julianxcarter julianxcarter self-assigned this May 26, 2021
Copy link
Contributor

@julianxcarter julianxcarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@julianxcarter julianxcarter merged commit d3a5a83 into develop May 26, 2021
@julianxcarter julianxcarter deleted the fix-checklogfile branch May 26, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants