-
Notifications
You must be signed in to change notification settings - Fork 82
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
Proper quoting of bash variables enables correct tests in bash #679
Comments
Ha! I'm glad someone else has found this. I'm having the exact same problem on a new cluster I'm setting up eager on. I have absolutely no clue why this issue is coming up now, as I don't have this problem on my computer nor 5 other clusters I have set it up on. But if this issue is replicable, as in your case, then it's good to know it's not some weird edge case. I'll let you know if I find a solution. I have already tried fixing this as you suggest, but for some reason the process results in exit code of 1 even though everything completes properly.... No clue why |
Hi @nylander does this version work for you: |
Maybe another option would be to abandon this as Bash code and either have a separate AdapterRemoval merging process that does the merging based on the parameters set / used and/or add this in groovy syntax? That seems to be more stable 😓 |
Agreed, I think it's safer. This will be a bit of change, but worth it in the long-run I guess. From Alex's list (sent via slack), I will update the following:
|
This should be fixed now by replacing all bash logic with groovy. @nylander would be grateful if you could test the latest |
Description of the bug
While error checking I noticed the same error in several of the
.command.log
files: "unary operator expected".The reason seems to be that in the corresponding
.command.sh
files, a variable,preserve5p
, was empty, leading to a (generated) code like this (notice the empty space before the first=
):On line #1161 in
main.nf
, you use a ternary operator to set the variable to eitherparams.preserve5p
or''
(i.e., empty string).The problem arises later (on line #1171 in main.nf), where the first part of the test fails
Possible solution?
Make sure variables are quoted correctly in the generated bash scripts. For example:
Disclaimer: I do not know the reason why the preserve5p variable was empty in the first case. Proper quoting might take care of the testing (of an empty string), but the empty variable may have been unintended and induced some other way. I have not checked further.
Steps to reproduce
Steps to reproduce the behaviour:
Expected behaviour
Log files
Have you provided the following extra information/files:
.nextflow.log
fileSystem
Container engine
Additional context
The text was updated successfully, but these errors were encountered: