Skip to content

Commit

Permalink
Hotfix/unsupported exception empty map (#172)
Browse files Browse the repository at this point in the history
* fix: verify map not empty to avoid UnsupportedException

* chore: bump up plugin version to 0.21.1
  • Loading branch information
mgabelle authored Feb 11, 2025
1 parent 95a8014 commit ce1b4d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=0.21.0
version=0.21.1
kestraVersion=[0.18,)
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 @@ -141,9 +141,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 ce1b4d2

Please sign in to comment.