We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug If you have a symlink in your repository pointing to a non-existent file, MegaLinter fails hard.
MegaLinter
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/local/lib/python3.11/site-packages/megalinter-0.1-py3.11.egg/megalinter/run.py", line 15, in <module> linter.run() File "/usr/local/lib/python3.11/site-packages/megalinter-0.1-py3.11.egg/megalinter/MegaLinter.py", line 142, in run self.collect_files() File "/usr/local/lib/python3.11/site-packages/megalinter-0.1-py3.11.egg/megalinter/MegaLinter.py", line 637, in collect_files linter.collect_files(filtered_files) File "/usr/local/lib/python3.11/site-packages/megalinter-0.1-py3.11.egg/megalinter/Linter.py", line [77](https://$github/$orga/$repo/runs/7598908?check_suite_focus=true#step:5:79)6, in collect_files self.files = utils.filter_files( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/megalinter-0.1-py3.11.egg/megalinter/utils.py", line 163, in filter_files and not file_contains( ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/megalinter-0.1-py3.11.egg/megalinter/utils.py", line 232, in file_contains with open(file_name, "r", encoding="utf-8", errors="ignore") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/github/workspace/kiwi/seed-root/0-global/etc/localtime'
To Reproduce Steps to reproduce the behaviour:
ln -s ../i-dont-exists but-i-do-now
git add but-i-do-now
git commit
git push
Expected behaviour MegaLinter doesn't fail on broken symlinks
The text was updated successfully, but these errors were encountered:
Fix crash in case of unreachable symlinks
0cb2ab1
Fixes #2525 Co-authored-by: Silvio Knizek <7925665+killermoehre@users.noreply.github.com>
Fix crash in case of unreachable symlinks (#2538)
dd5b158
Successfully merging a pull request may close this issue.
Describe the bug
If you have a symlink in your repository pointing to a non-existent file,
MegaLinter
fails hard.To Reproduce
Steps to reproduce the behaviour:
ln -s ../i-dont-exists but-i-do-now
git add but-i-do-now
git commit
git push
Expected behaviour
MegaLinter
doesn't fail on broken symlinksThe text was updated successfully, but these errors were encountered: