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

Argument list too long occurred when the file is exceed the limit. #32

Open
kevindiu opened this issue Sep 30, 2021 · 1 comment
Open

Comments

@kevindiu
Copy link

kevindiu commented Sep 30, 2021

In Vald project, we are using reviewdog to review our .md and .toml files.
https://github.com/vdaas/vald/blob/master/.github/workflows/reviewdog-markdown.yml

But when we are using it, an error occurred and the CI failed with the following error message.

...
Checking .github/chatops_commands.md...
2021-09-28 07:34:09.490 +0000 INFO  org.languagetool.server.TextChecker Check done: 365 chars, en-US, requestId: null, #5, null, 0 matches, 84ms, agent:-, sent, q:0, h:1, dH:1, m:all
Checking CHANGELOG.md...
/entrypoint.sh: line 43: curl: Argument list too long
tmpl: EOF

https://github.com/vdaas/vald/pull/1450/checks?check_run_id=3751663477

As the error message shown, the error is caused by entrypoint.sh file.
https://github.com/reviewdog/action-languagetool/blob/master/entrypoint.sh#L43-L48

I did some research about it, and it seems that the entire file content is sent from command line option.
--data-urlencode "text=$(cat "${FILE}")" \

I think we can improve it by using @file instead of cat $FILE. e.g.
--data-urlencode "text=@"${FILE}"" \
Ref: https://stackoverflow.com/questions/54090784/curl-argument-list-too-long

@Fibs7000
Copy link

+1

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

No branches or pull requests

2 participants