From 57f7e588b1a077ee0c9de9aa94d47e24f11f30cb Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Thu, 9 Jan 2025 09:56:42 -0600 Subject: [PATCH] Fix CLI params normalization Signed-off-by: Ben Sherman --- .../nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy | 2 +- .../src/test/groovy/nextflow/cli/CmdRunTest.groovy | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy index 5f6c904fe0..fca4596a9c 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy @@ -685,7 +685,7 @@ class CmdRun extends CmdBase implements HubOptions { addParam((Map)nested, key.substring(p+1), value, path, fullKey) } else { - params.put(key.replaceAll(DOT_ESCAPED,'.'), parseParamValue(value)) + addParam0(params, key.replaceAll(DOT_ESCAPED,'.'), parseParamValue(value)) } } diff --git a/modules/nextflow/src/test/groovy/nextflow/cli/CmdRunTest.groovy b/modules/nextflow/src/test/groovy/nextflow/cli/CmdRunTest.groovy index 2de2397181..df6448c25f 100644 --- a/modules/nextflow/src/test/groovy/nextflow/cli/CmdRunTest.groovy +++ b/modules/nextflow/src/test/groovy/nextflow/cli/CmdRunTest.groovy @@ -99,16 +99,16 @@ class CmdRunTest extends Specification { when: def params = [:] - CmdRun.addParam0(params, 'alphaBeta', 1) - CmdRun.addParam0(params, 'alpha-beta', 10) + CmdRun.addParam(params, 'alphaBeta', '1') + CmdRun.addParam(params, 'alpha-beta', '10') then: params['alphaBeta'] == 10 !params.containsKey('alpha-beta') when: params = [:] - CmdRun.addParam0(params, 'aaa-bbb-ccc', 1) - CmdRun.addParam0(params, 'aaaBbbCcc', 10) + CmdRun.addParam(params, 'aaa-bbb-ccc', '1') + CmdRun.addParam(params, 'aaaBbbCcc', '10') then: params['aaaBbbCcc'] == 10 !params.containsKey('aaa-bbb-ccc')