Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Node): Fix error and crash due to custom cacheFolder in achecker.yml #1240

Merged
merged 5 commits into from
Jan 27, 2023

Conversation

sct-will
Copy link
Contributor

@sct-will sct-will commented Jan 18, 2023

Code to address the case when a user configures a custom cacheFolder in achecker.yml.

The problem was, the previous code did not account for the fact that the code runs in the accessibility_checker/src/lib folder, so a require( ) has to be relative to this directory, hence the need to go up two directory levels if the cacheFolder is relative path and not a fully qualified path.

This update works for any cacheFolder directory.

  • Automated tool bug

This PR is related to the following issue(s):

#1149

Additional information can be found here:

Testing reference:

In order to test, edit cacheFolder in achecker.yml (as shown in the lines below) to any desired directory, then run automated test to verify there are no failures.

# optional - Where the tool can read/write cached files (ace-node.js / archive.json)
# cacheFolder: /tmp/accessibility-checker
cacheFolder: accessibility-checker

I have conducted the following for this PR:

  • I validated this code in Chrome and FF
  • I validated this fix in my local env
  • I provided details for testing
  • This PR has been reviewed and is ready for test
  • I understand that the title of this PR will be used for the next release notes.

Code to address the case when a user configures a custom cacheFolder in achecker.yml.

The problem was, the previous code did not account for the fact that the code runs in the accessibility_checker/src/lib folder, so a require( ) has to be relative to this directory, hence the need to go up two directory levels if the cacheFolder is relative path and not a fully qualified path.

This update works for any cacheFolder directory.
@sct-will sct-will self-assigned this Jan 18, 2023
@sct-will sct-will added the node-accessibility-checker Issues in the accessibility-checker component label Jan 18, 2023
tombrunet
tombrunet previously approved these changes Jan 19, 2023
@ErickRenteria ErickRenteria merged commit e735264 into master Jan 27, 2023
@tombrunet tombrunet changed the title fix (Checker packages): Fix error and crash due to custom cacheFolder in achecker.yml fix(Node): Fix error and crash due to custom cacheFolder in achecker.yml Jan 27, 2023
@tombrunet tombrunet deleted the will-equal-access-1149 branch February 8, 2023 20:46
@sct-will sct-will added the user-reported Issues identified outside of the core team label Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-accessibility-checker Issues in the accessibility-checker component Ready for QA user-reported Issues identified outside of the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants