Skip to content

Commit 036f123

Browse files
pditommasoclaude
andcommitted
Fix HttpPluginRepository empty plugin list check (#6650)
Revert condition from `!decoded.plugins` to `decoded.plugins == null` to avoid throwing an exception when the registry returns an empty list. In Groovy, an empty list is falsy, so the previous check incorrectly treated a valid empty response as a parse failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
1 parent 17a6075 commit 036f123

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/nf-commons/src/main/nextflow/plugin/HttpPluginRepository.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class HttpPluginRepository implements PrefetchUpdateRepository {
168168
}
169169
try {
170170
final ListDependenciesResponse decoded = encoder.decode(body)
171-
if( !decoded.plugins ) {
171+
if( decoded.plugins == null ) {
172172
throw new PluginRuntimeException("Failed to download plugin metadata: Failed to parse response body")
173173
}
174174
final result = new HashMap<String, PluginInfo>()

0 commit comments

Comments
 (0)