From df03e5b2dce3c6e801dfca60e69cc3af3cea5005 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Sat, 27 Jul 2024 12:30:32 +0200 Subject: [PATCH] wip Signed-off-by: Paolo Di Tommaso --- .../main/groovy/nextflow/cli/CmdSecret.groovy | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/CmdSecret.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/CmdSecret.groovy index cb4aa60acf..6b6ee38758 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/CmdSecret.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/CmdSecret.groovy @@ -17,10 +17,14 @@ package nextflow.cli +import java.nio.file.Paths + import com.beust.jcommander.Parameter import com.beust.jcommander.Parameters import groovy.transform.CompileStatic import groovy.util.logging.Slf4j +import nextflow.Session +import nextflow.config.ConfigBuilder import nextflow.exception.AbortOperationException import nextflow.plugin.Plugins import nextflow.secret.SecretsLoader @@ -96,6 +100,16 @@ class CmdSecret extends CmdBase implements UsageAware { println result.join('\n').toString() } + private Session createSession() { + // create the config + final config = new ConfigBuilder() + .setOptions(getLauncher().getOptions()) + .setBaseDir(Paths.get('.')) + .build() + + return new Session(config) + } + /** * Main command entry point */ @@ -108,6 +122,8 @@ class CmdSecret extends CmdBase implements UsageAware { // setup the plugins system and load the secrets provider Plugins.init() +// createSession() + Plugins.load(Map.of()) provider = SecretsLoader.instance.load() // run the command