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 (maybe caused by a bunch of commented lines) #149

Open
MdeLv opened this issue Mar 13, 2023 · 4 comments
Open

Argument list too long (maybe caused by a bunch of commented lines) #149

MdeLv opened this issue Mar 13, 2023 · 4 comments

Comments

@MdeLv
Copy link

MdeLv commented Mar 13, 2023

debian11
bash 5.1.4(1)
The program (in bash) is 3500 lines.

Error message: Argument list too long: /bin/bash

Cause detected: approx 100 bash commented lines (#)
Once deleted, shc works again.

Is any limitation reached? (just 3500 lines)
Or is there another cause?

I suppose that shc drop all comments when building the executable, so there may be another cause.
What is weird is that shc has been working for weeks before that with these commented lines.
I tried to delete added functions but that's only deleting these 100 commented lines that fixed the trouble.

Thanks.

@MdeLv
Copy link
Author

MdeLv commented Mar 13, 2023

Once again, I got the error message: "Argument list too long: /bin/bash", also solved with deleting commented lines.
However, this was not added commented lines. I just added normal loc.

What triggers the error message is still unknown.

Any idea for finding the root cause?

@MdeLv
Copy link
Author

MdeLv commented Jun 6, 2023

Well...
In order to not getting this "Argument list too long: /bin/bash" error, you need not too many commented lines in your bash script.
The exact number and place of these comments that trigger this error are unknown...

Can the author give hints about how to avoid this error?
Thanks.

@htpcBeginner
Copy link

htpcBeginner commented Nov 13, 2023

@MdeLv Hi, did you ever find a fix for this? I am having the same problem. Tried deleting all comments but no dice.

@MdeLv
Copy link
Author

MdeLv commented Nov 13, 2023

I don't know what can cause "Argument list too long".
Deleting enough comments (but not all) was enough in my case.

Maybe you have also some syntax error? Have you tried to use some lint tool to check that?
Or you can "compile" parts/modules of your program for detecting which part may trigger that error?

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