Skip to content

Commit

Permalink
fix: verify map not empty to avoid UnsupportedException (#171) (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgabelle authored Mar 6, 2025
1 parent 5709f03 commit e878565
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/dbt/cli/AbstractDbt.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ public void setDockerOptions(Property<DockerOptions> dockerOptions) {
@Override
public ScriptOutput run(RunContext runContext) throws Exception {
var renderedOutputFiles = runContext.render(this.outputFiles).asList(String.class);
var renderedEnvMap = runContext.render(this.getEnv()).asMap(String.class, String.class);

CommandsWrapper commandsWrapper = new CommandsWrapper(runContext)
.withEnv(runContext.render(this.getEnv()).asMap(String.class, String.class))
.withEnv(renderedEnvMap.isEmpty() ? new HashMap<>() : renderedEnvMap)
.withNamespaceFiles(namespaceFiles)
.withInputFiles(inputFiles)
.withOutputFiles(renderedOutputFiles.isEmpty() ? null : renderedOutputFiles)
Expand Down

0 comments on commit e878565

Please sign in to comment.