-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bug: cannot add a very long command to queue #24
Comments
Hey @orsharir. Thanks for you interest in |
To clarify, my command is a script with many parameters, so there shouldn't be any need for sh in my case. My specific command call is of no concern (it's a script for training an ML model with many arguments to configure it), but here is a simple example. This call will work fine:
However, this slightly longer call will fail (I'm using -f here to capture the error message from ts):
|
Cool! My gut feeling is that something overflows at some point. I'm a bit occupied at the moment but I will investigate it asap. If you have any insight please let me know. Thanks! |
I have a similar problem, but it shows a little different. I create tasks via webhook using https://github.com/adnanh/webhook and i'm using the -m/Mail function of ts and all that works great - almost! My last parameter is one long string. The spooled script receives the last parameter complete! But the created mail has some binary garbage in the line starting with "Command:". That already breaks the view in Outlook and on mobile devices but the webview works. The garbage begins at character 500 of the mail body. Hopefully these information may help to reproduce and fix the problem. |
Hey @mw75. Thanks for your info. Just to clarify, did you get it to work with a shorter command? |
Thanks @justanhduc, it appears to be fixed on my end. |
Sadly it does not fix my problem! While compiling with make cpu i get
I don't know if it is related to the problem or not. Is there something i'm doing wrong. Running and compiling on debian 10. @orsharir could you have a second look, please? |
Hey @mw75. They are warnings, and that piece of codes is only executed when you use |
@justanhduc Sorry, missed your response because the issue is still closed! Steps to reproduce an clean debian system:
I run it with Output:
There is also some more garbage in front of "Output:" I hope that helps to reproduce! Please reopen the issue so i get notified on updates! |
Don't know if this works with unicode/multibyte strings, but it fixed my problem. |
Hey @mw75! Great catch! I can see that your command is a little longer than the hardcoded 500, so it truncates the command and prints some garbage at the end of the sentence. |
@justanhduc it would be least effort if you just copy paste the single line as i only cloned your repo without forking right now. Will try to take time for a PR next days if you absolutly prefer. |
Well, sending PR is the best way to credit you as you will show up in the contributor list :). You can take as much time as you need. |
bug from justanhduc#24 still persisted, fixxed it
When trying to add a command with many parameters, task-spooler will crash at:
task-spooler/execute.c
Line 45 in e5a9911
I'm currently using a workaround by having a script that stores the command in a variable, and then pass task-spooler a script that reads the command from the variable and execute it. But that's just a hack of course.
Here are my workaround scripts:
ts_helper
with usagets_helper OPTIONS @ LONG_COMMAND
:which calls the script
ts_helper_runner
:The text was updated successfully, but these errors were encountered: