Skip to content

Commit

Permalink
fix: commands wrapper dp (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgabelle authored Feb 18, 2025
1 parent 6fe0f7c commit 66a4b3a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/main/java/io/kestra/plugin/aws/cli/AwsCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.kestra.core.models.tasks.*;
import io.kestra.core.models.tasks.runners.TaskRunner;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.JacksonMapper;
import io.kestra.plugin.aws.AbstractConnection;
import io.kestra.plugin.scripts.exec.scripts.models.DockerOptions;
import io.kestra.plugin.scripts.exec.scripts.models.ScriptOutput;
Expand Down Expand Up @@ -94,9 +95,7 @@ public class AwsCLI extends AbstractConnection implements RunnableTask<ScriptOut
@Schema(
title = "The AWS commands to run."
)
@PluginProperty(dynamic = true)
@NotNull
@NotEmpty
protected List<String> commands;

@Schema(
Expand Down Expand Up @@ -178,12 +177,8 @@ public ScriptOutput run(RunContext runContext) throws Exception {
.withDockerOptions(injectDefaults(getDocker()))
.withTaskRunner(this.taskRunner)
.withContainerImage(this.containerImage)
.withCommands(
ScriptService.scriptCommands(
List.of("/bin/sh", "-c"),
null,
allCommands)
)
.withInterpreter(Property.of(List.of("/bin/sh", "-c")))
.withCommands(new Property<>(JacksonMapper.ofJson().writeValueAsString(allCommands)))
.withEnv(this.getEnv(runContext))
.withNamespaceFiles(namespaceFiles)
.withInputFiles(inputFiles)
Expand Down

0 comments on commit 66a4b3a

Please sign in to comment.