Commit 196e631
committed
Fix module binaries PATH not injected on
When a module is launched directly via `nextflow module run`, the module
main.nf is loaded as the entry script, so `ScriptMeta.isModule()` is
false and `TaskProcessor.getModuleBundle()` was returning null, causing
the `resources/usr/bin` directory not to be added to the task PATH.
Switch the gate from `isModule()` to `getScriptPath()` so the bundle is
resolved whenever the owner script has a known path. This makes the
behavior of `nextflow module run` consistent with `nextflow run` plus
include. The feature remains opt-in via `nextflow.enable.moduleBinaries`.
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>nextflow module run (#7087)1 parent 656ff4e commit 196e631
2 files changed
Lines changed: 41 additions & 1 deletion
File tree
- modules/nextflow/src
- main/groovy/nextflow/processor
- test/groovy/nextflow/processor
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
1572 | | - | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
1573 | 1577 | | |
1574 | 1578 | | |
1575 | 1579 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
103 | 139 | | |
104 | 140 | | |
105 | 141 | | |
| |||
0 commit comments