diff --git a/src/main/java/io/kestra/plugin/dbt/cli/DbtCLI.java b/src/main/java/io/kestra/plugin/dbt/cli/DbtCLI.java index 15d5414..fafed75 100644 --- a/src/main/java/io/kestra/plugin/dbt/cli/DbtCLI.java +++ b/src/main/java/io/kestra/plugin/dbt/cli/DbtCLI.java @@ -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) diff --git a/src/main/java/io/kestra/plugin/dbt/cli/Setup.java b/src/main/java/io/kestra/plugin/dbt/cli/Setup.java index b0afa2b..cee2944 100644 --- a/src/main/java/io/kestra/plugin/dbt/cli/Setup.java +++ b/src/main/java/io/kestra/plugin/dbt/cli/Setup.java @@ -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(); }