From 4828e78708ecf6ddb8a2a8db560bb72f72357330 Mon Sep 17 00:00:00 2001 From: Piotr Faba Date: Thu, 2 Jul 2020 21:57:44 +0200 Subject: [PATCH 1/3] fix error introduced earlier --- conf/bi.config | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/conf/bi.config b/conf/bi.config index 65059e3..3a77bb7 100644 --- a/conf/bi.config +++ b/conf/bi.config @@ -4,17 +4,12 @@ params{ config_profile_url = 'https://www.boehringer-ingelheim.com/' } -params.globalConfig = set_global_config() - - -def set_global_config() { - def config = System.getenv('NXF_GLOBAL_CONFIG') - if(config == null) - { - def errorMessage = "WARNING: For bi.config requires NXF_GLOBAL_CONFIG env var to be set. Point it to global.config file if you want to use this profile." - System.err.println(errorMessage) - }else{ - includeConfig config - } - return config +def configVar = System.getenv('NXF_GLOBAL_CONFIG') +if(configVar == null) +{ + def errorMessage = "WARNING: For bi.config requires NXF_GLOBAL_CONFIG env var to be set. Point it to global.config file if you want to use this profile." + System.err.println(errorMessage) +}else{ + params.globalConfig = configVar + includeConfig configVar } From 4181184f58892a6c42efba3e9bd1eceaf7a6fd73 Mon Sep 17 00:00:00 2001 From: Piotr Faba Date: Thu, 2 Jul 2020 22:00:37 +0200 Subject: [PATCH 2/3] fix spaces --- conf/bi.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/bi.config b/conf/bi.config index 3a77bb7..fe2ae17 100644 --- a/conf/bi.config +++ b/conf/bi.config @@ -10,6 +10,6 @@ if(configVar == null) def errorMessage = "WARNING: For bi.config requires NXF_GLOBAL_CONFIG env var to be set. Point it to global.config file if you want to use this profile." System.err.println(errorMessage) }else{ - params.globalConfig = configVar - includeConfig configVar + params.globalConfig = configVar + includeConfig configVar } From cb7a6f756af97154cc2867c484488408caa0babd Mon Sep 17 00:00:00 2001 From: Piotr Faba Date: Tue, 7 Jul 2020 13:48:28 +0200 Subject: [PATCH 3/3] reduce complexity --- conf/bi.config | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conf/bi.config b/conf/bi.config index fe2ae17..1a218f1 100644 --- a/conf/bi.config +++ b/conf/bi.config @@ -4,12 +4,11 @@ params{ config_profile_url = 'https://www.boehringer-ingelheim.com/' } -def configVar = System.getenv('NXF_GLOBAL_CONFIG') -if(configVar == null) +params.globalConfig = System.getenv('NXF_GLOBAL_CONFIG') +if(params.globalConfig == null) { def errorMessage = "WARNING: For bi.config requires NXF_GLOBAL_CONFIG env var to be set. Point it to global.config file if you want to use this profile." System.err.println(errorMessage) }else{ - params.globalConfig = configVar - includeConfig configVar + includeConfig params.globalConfig }