nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.75k stars 628 forks source link

`launch_nextflow` does not handle properly the spaces in java path #3214

Closed asl closed 2 months ago

asl commented 2 years ago

Bug report

Expected behavior and actual behavior

Cannot run nextflow CLI

Steps to reproduce the problem

Just run nextflow CLI script

Program output

We are having:

/opt/homebrew/bin/nextflow: line 177: /Library/Internet: No such file or directory
/opt/homebrew/bin/nextflow: line 177: exec: /Library/Internet: cannot execute: No such file or directory

apparently the code in launch_nextflow does not handle properly spaces. For the record, here is the contents of ${launcher[@]}:

"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1" "-Djava.io.tmpdir=/var/folders/jm/hc1mgp813kb_9x8z1kdwvqjc0000gn/T/" "-Djava.library.path=/Users/asl/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java" "-Dfile.encoding=UTF-8" "-Dcapsule.app=nextflow_21.04.1" "-Djava.awt.headless=true" "-Dcapsule.jar=/Users/asl/.nextflow/framework/21.04.1/nextflow-21.04.1-one.jar" "-classpath" "/Users/asl/.nextflow/framework/21.04.1/nextflow-21.04.1-one.jar:/Users/asl/.nextflow/capsule/deps/io/nextflow/nextflow/21.04.1/nextflow-21.04.1.jar:/Users/asl/.nextflow/capsule/deps/org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar:/Users/asl/.nextflow/capsule/deps/io/nextflow/nf-httpfs/21.04.1/nf-httpfs-21.04.1.jar:/Users/asl/.nextflow/capsule/deps/io/nextflow/nf-commons/21.04.1/nf-commons-21.04.1.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/groovy/groovy-nio/3.0.7/groovy-nio-3.0.7.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/groovy/groovy-templates/3.0.7/groovy-templates-3.0.7.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/groovy/groovy-xml/3.0.7/groovy-xml-3.0.7.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/groovy/groovy-json/3.0.7/groovy-json-3.0.7.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/groovy/groovy/3.0.7/groovy-3.0.7.jar:/Users/asl/.nextflow/capsule/deps/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar:/Users/asl/.nextflow/capsule/deps/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/Users/asl/.nextflow/capsule/deps/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar:/Users/asl/.nextflow/capsule/deps/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar:/Users/asl/.nextflow/capsule/deps/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/gpars/gpars/1.2.1/gpars-1.2.1.jar:/Users/asl/.nextflow/capsule/deps/ch/grengine/grengine/1.3.0/grengine-1.3.0.jar:/Users/asl/.nextflow/capsule/deps/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/asl/.nextflow/capsule/deps/org/pf4j/pf4j-update/2.3.0/pf4j-update-2.3.0.jar:/Users/asl/.nextflow/capsule/deps/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/Users/asl/.nextflow/capsule/deps/com/beust/jcommander/1.35/jcommander-1.35.jar:/Users/asl/.nextflow/capsule/deps/com/esotericsoftware/kryo/kryo/2.24.0/kryo-2.24.0.jar:/Users/asl/.nextflow/capsule/deps/org/iq80/leveldb/leveldb/0.12/leveldb-0.12.jar:/Users/asl/.nextflow/capsule/deps/org/eclipse/jgit/org.eclipse.jgit/5.2.1.201812262042-r/org.eclipse.jgit-5.2.1.201812262042-r.jar:/Users/asl/.nextflow/capsule/deps/javax/mail/mail/1.4.7/mail-1.4.7.jar:/Users/asl/.nextflow/capsule/deps/javax/activation/activation/1.1.1/activation-1.1.1.jar:/Users/asl/.nextflow/capsule/deps/org/yaml/snakeyaml/1.18/snakeyaml-1.18.jar:/Users/asl/.nextflow/capsule/deps/org/jsoup/jsoup/1.11.2/jsoup-1.11.2.jar:/Users/asl/.nextflow/capsule/deps/jline/jline/2.9/jline-2.9.jar:/Users/asl/.nextflow/capsule/deps/org/pf4j/pf4j/3.4.1/pf4j-3.4.1.jar:/Users/asl/.nextflow/capsule/deps/com/google/guava/guava/24.1.1-jre/guava-24.1.1-jre.jar:/Users/asl/.nextflow/capsule/deps/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/asl/.nextflow/capsule/deps/org/multiverse/multiverse-core/0.7.0/multiverse-core-0.7.0.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/jsr166-mirror/jsr166y/1.7.0/jsr166y-1.7.0.jar:/Users/asl/.nextflow/capsule/deps/org/objenesis/objenesis/2.1/objenesis-2.1.jar:/Users/asl/.nextflow/capsule/deps/org/iq80/leveldb/leveldb-api/0.12/leveldb-api-0.12.jar:/Users/asl/.nextflow/capsule/deps/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar:/Users/asl/.nextflow/capsule/deps/com/jcraft/jzlib/1.1.1/jzlib-1.1.1.jar:/Users/asl/.nextflow/capsule/deps/com/googlecode/javaewah/JavaEWAH/1.1.6/JavaEWAH-1.1.6.jar:/Users/asl/.nextflow/capsule/deps/com/github/zafarkhaja/java-semver/0.9.0/java-semver-0.9.0.jar:/Users/asl/.nextflow/capsule/deps/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/asl/.nextflow/capsule/deps/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar:/Users/asl/.nextflow/capsule/deps/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar:/Users/asl/.nextflow/capsule/deps/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/Users/asl/.nextflow/capsule/deps/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/Users/asl/.nextflow/capsule/deps/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar" "nextflow.cli.Launcher"

Environment

(note that $SHELL reports current shell which might be not bash)

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

pditommaso commented 2 months ago

Solved via https://github.com/nextflow-io/nextflow/issues/2951