Non-CLI usage of nf-core download
Description of feature
Hi there,
Currently the nf-core download command doesn't permit a parameter-based answer to to the Define $NXF_SINGULARITY_CACHEDIR f question that pops up on the command-line interface. For the purposes of putting this command in a script, it would be handy to not have to interact with a command line prompt at all.
Thanks for the useful tool!
Sorry for the late reply.
Technically, this should already be the case. The code has a check that should prevent prompts from being shown in non-interactive sessions:
https://github.com/nf-core/tools/blob/930ece572bf23b68c7a7c5259e918a878ba6499e/nf_core/download.py#L440-L444
Why this detection fails in your case, I can't tell. Have you tried to pipe the output to tee, cat or tail or something? At least the pipe should be detected, and any interactive prompts thus turned off.
Is there a reason that you can't provide it on the same line as the command? eg.
NXF_SINGULARITY_CACHEDIR="/path/to/cache" nf-core download
Then as @MatthiasZepper says, the interactive prompt shouldn't show. And it is not super different to using a flag with the path after the command.
I presume, that the original poster does not want to define a cache directory?
This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days.
This issue was closed because it has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor and then staled for 20 days with no activity.