From 959ad9fae17d80c407b584f06cee1b336cae5d23 Mon Sep 17 00:00:00 2001 From: Mark Woon Date: Wed, 27 Aug 2025 10:27:40 -0700 Subject: [PATCH 1/2] Support running in cygwin Support running in cygwin by translating cygwin-style paths (starting with /cygrdrive/) to windows-style paths. Signed-off-by: Mark Woon --- nextflow | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nextflow b/nextflow index 315be00dad..4ee2edfaab 100755 --- a/nextflow +++ b/nextflow @@ -15,9 +15,17 @@ # limitations under the License. [[ "$NXF_DEBUG" == 'x' ]] && set -x + +home=$HOME +if [[ "$HOME" == "/cygdrive/"* ]]; then + drive_letter="${HOME:10:1}" + replacement="$drive_letter:" + home="${HOME/\/cygdrive\/$drive_letter/$replacement}" +fi + NXF_VER=${NXF_VER:-'25.07.0-edge'} NXF_ORG=${NXF_ORG:-'nextflow-io'} -NXF_HOME=${NXF_HOME:-$HOME/.nextflow} +NXF_HOME=${NXF_HOME:-$home/.nextflow} NXF_PROT=${NXF_PROT:-'https'} NXF_BASE=${NXF_BASE:-$NXF_PROT://www.nextflow.io/releases} NXF_TEMP=${NXF_TEMP:-$TMPDIR} From 016b22797bb5065ca66ab0aa45a8a6ffc2514b00 Mon Sep 17 00:00:00 2001 From: Mark Woon Date: Tue, 2 Sep 2025 10:58:45 -0700 Subject: [PATCH 2/2] avoid local variable "home" avoid local variable "home" per request Signed-off-by: Mark Woon --- nextflow | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nextflow b/nextflow index 4ee2edfaab..204d735fbc 100755 --- a/nextflow +++ b/nextflow @@ -15,17 +15,16 @@ # limitations under the License. [[ "$NXF_DEBUG" == 'x' ]] && set -x - -home=$HOME +NXF_VER=${NXF_VER:-'25.07.0-edge'} +NXF_ORG=${NXF_ORG:-'nextflow-io'} if [[ "$HOME" == "/cygdrive/"* ]]; then drive_letter="${HOME:10:1}" replacement="$drive_letter:" - home="${HOME/\/cygdrive\/$drive_letter/$replacement}" + normalized_home="${HOME/\/cygdrive\/$drive_letter/$replacement}/.nextflow" + NXF_HOME=${NXF_HOME:-$normalized_home/.nextflow} +else + NXF_HOME=${NXF_HOME:-$HOME/.nextflow} fi - -NXF_VER=${NXF_VER:-'25.07.0-edge'} -NXF_ORG=${NXF_ORG:-'nextflow-io'} -NXF_HOME=${NXF_HOME:-$home/.nextflow} NXF_PROT=${NXF_PROT:-'https'} NXF_BASE=${NXF_BASE:-$NXF_PROT://www.nextflow.io/releases} NXF_TEMP=${NXF_TEMP:-$TMPDIR}