I have to pass an environment variable to my tool ...
# modules
j
I have to pass an environment variable to my tool to keep Java behaving well (avoid writing a particular file to /tmp which causes collisions under some Apptainer configurations), unfortunately this includes when passing
--version
. With
versions.yml
I could
export
this early in the
script:
block which gets picked up by both the actual tool invocation and the
--version
invocation. But with topic channels it looks like I need to stick this in the
eval
qualifier and thus also in the meta.yml block. This looks kind of horrendous. Is there a better way to handle this? Here's the command line I'm currently using:
Copy code
JAVA_TOOL_OPTIONS='-XX:+PerfDisableSharedMem' ashlar --version | sed 's/^.*ashlar //'
This leads to the following in `meta.yml`:
Copy code
versions_ashlar:
    ...
    - JAVA_TOOL_OPTIONS='-XX:+PerfDisableSharedMem' ashlar --version | sed 's/^.*ashlar //':
        type: eval
        description: The expression to obtain the version of the tool
(I also note that
nf-core modules lint --fix
wrapped that line in the generated output which caused a yaml syntax error "ScannerError: mapping values are not allowed here", crashing
nf-core
!)
😬 1