Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1625,23 +1625,32 @@ nextflow run <your script> -profile standard,cloud
:::

:::{danger}
When using the `profiles` feature in your config file, do NOT set attributes in the same scope both inside and outside a `profiles` context. For example:
When using the `profiles` feature in your config file, avoid setting attributes in the same scope for a specific profile with different syntaxes (`{` and `.`). If you want to do so, start with `{`. For example:

```groovy
process.cpus = 1

profiles {
foo {
process.memory = '2 GB'
process {
cpus = 2
}
}
```

bar {
process.memory = '4 GB'
In the above example, the `process.memory` attribute is not correctly applied because the `process` scope is later used with curly braces. The example below works as expected, with both attributes being set, though:


```groovy
profiles {
foo {
process {
cpus = 2
}
process.memory = '2 GB'
}
}
```

In the above example, the `process.cpus` attribute is not correctly applied because the `process` scope is also used in the `foo` and `bar` profiles.
In general, it's advised to pick one syntax and stick to it within specific profiles.
:::

(config-env-vars)=
Expand Down