Skip to content

Commit

Permalink
fix: make before commands rendered in kestra
Browse files Browse the repository at this point in the history
  • Loading branch information
mgabelle committed Feb 20, 2025
1 parent 318d5e7 commit 1c0b19b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/dbt/cli/DbtCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ public void accept(String line, Boolean isStdErr) {
"PIP_ROOT_USER_ACTION", "ignore"
))
.withInterpreter(this.interpreter)
.withBeforeCommands(Property.of(this.getBeforeCommandsWithOptions(runContext)))
.withBeforeCommands(this.beforeCommands)
.withBeforeCommandsWithOptions(true)
.withCommands(Property.of(
renderedCommands.stream()
.map(command -> command.startsWith("dbt") ? command.concat(" --log-format json") : command)
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/dbt/cli/Setup.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ public ScriptOutput run(RunContext runContext) throws Exception {
"PIP_ROOT_USER_ACTION", "ignore"
))
.withInterpreter(this.interpreter)
.withBeforeCommands(Property.of(this.getBeforeCommandsWithOptions(runContext)))
.withBeforeCommands(this.beforeCommands)
.withBeforeCommandsWithOptions(true)
.withCommands(Property.of(commands))
.run();
}
Expand Down

0 comments on commit 1c0b19b

Please sign in to comment.