mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-10 20:13:09 +00:00
Merge pull request #163 from piotr-faba-ardigen/add_bi_config
resolve #162 bug
This commit is contained in:
commit
7774a6a8f3
1 changed files with 12 additions and 10 deletions
|
@ -3,16 +3,18 @@ params{
|
|||
config_profile_contact = 'Alexander Peltzer (@apeltzer)'
|
||||
config_profile_url = 'https://www.boehringer-ingelheim.com/'
|
||||
}
|
||||
params.globalConfig = determine_global_config()
|
||||
|
||||
includeConfig params.globalConfig
|
||||
params.globalConfig = set_global_config()
|
||||
|
||||
def determine_global_config() {
|
||||
if( System.getenv('NXF_GLOBAL_CONFIG') == null)
|
||||
|
||||
def set_global_config() {
|
||||
def config = System.getenv('NXF_GLOBAL_CONFIG')
|
||||
if(config == null)
|
||||
{
|
||||
def errorMessage = "ERROR: Environment variable NXF_GLOBAL_CONFIG is missing. Set it to point to global.config file."
|
||||
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)
|
||||
throw new Exception(errorMessage)
|
||||
}else{
|
||||
includeConfig config
|
||||
}
|
||||
return System.getenv('NXF_GLOBAL_CONFIG')
|
||||
return config
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue