-
Notifications
You must be signed in to change notification settings - Fork 642
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
Boolean evaluation result incorrect for enabled attribute of publishDir #2677
Comments
Think it's a side effect of this change However, I think it's still consistent because Changing the param to the following should work
|
@junjun-zhang Simply changing the enabled part to:
I did this in my project as well, and mentioned in our original discussion: #1933 (reply in thread) It threw me at first also, but it is not really a bug, but a bugfix. Consider: Before, groovy> "/path/to/output" as boolean // output is defined
Result: true
groovy> "" as boolean // output not defined
Result: false Now, it uses groovy> Boolean.parseBoolean("/path/to/output") // output is defined
Result: false
groovy> Boolean.parseBoolean("") // output not defined
Result: false The reason they changed it is because of this: groovy> "false" as boolean
Result: true By changing your groovy> Boolean.parseBoolean("${'/path/to/output' as boolean}")
Result: true It meant having to change this line in all process files, which was a bit tedious. In fact, it is what inspired me to open this PR: #2432 (@pditommaso), which would make it much easier to set this default publishing behavior. |
The rationale of this change is to allow interpreting |
Inclined to keep in this form. Closing this issue, feel to comment below if needed. |
Bug report
With the following testing script, when an
outdir
params is provided, there is no output folder created.Expected behavior and actual behavior
Expected behavior: run the above process by
nextflow run test_publishDir.nf --outdir out
, I should be able to see the output inside of a folder named asout
. Previously this worked fine as discussed here: #1933Actual behavior: no
out
folder created.Environment
Additional context
enabled: params.outdir ? true : false
then it works as expected.The text was updated successfully, but these errors were encountered: