-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
How to --dump
to file?
#214
Comments
Yeah, that's a bug in lychee then. It should consider the output setting. Let me move that over to the main repo. |
Actually I'm confused. It should work: This has always been the case, ever since we supported dumping links in the first place. |
Hmm, did you make it work with you GH Action? If you've an example at hand that would be awesome! |
Whoops, then let me move it back to lychee-action. Apologies for the confusion. - name: Link Checker
uses: lycheeverse/lychee-action@master
with:
# Check all markdown and html files in repo (default)
args: --base . --dump './**/*.md' './**/*.html' './**/*.rst'
# Use different output file path
output: /tmp/foo.txt The default path currently is To reuse the output in a downstream job that depends on this job, see "Defining outputs for jobs" in the GitHub Docs. |
Thanks again for trying to help here, mre!
That's correct. So the question is still the same... :D
It should only be used in a subsequent step within the same job. Can you provide me a working example that e.g. prints the file afterwards in a following step in the action?
|
Hum, I don't know the answer. This doesn't work at least: name: Links
on:
workflow_dispatch:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dump Output
uses: lycheeverse/[email protected]
with:
args: --dump './**/*.md' './**/*.html' './**/*.rst'
output: ./lychee/out.md
debug: true
- name: Print Output
run: cat ./lychee/out.md Output:
I've added the debug flag. Maybe that helps to troubleshoot the issue. |
So I'm running into a similar situation, where when I pass in the Line 33 in ef8c8f3
It looks like it runs the Rather than making it two different if statements, perhaps it should be nested. Something like:
|
Cool. Can you send a pull request with that change, so we can test it? |
Tested the PR, and it looks good. |
Also added an integration test for |
It looks like
--dump
only prints the found links to the console.I would like to dump the extracted links to a file to further work with it.
Not sure how to do this with the action.
output:
is not considered, or I'm not sure of the actual location 🤔The text was updated successfully, but these errors were encountered: