Skip to content

Commit

Permalink
refactor: migrate cli dynamic properties (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgabelle authored Jan 2, 2025
1 parent b52a54c commit e8cf372
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/io/kestra/plugin/azure/cli/AzCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,14 @@ public class AzCLI extends Task implements RunnableTask<ScriptOutput>, Namespace

private Object inputFiles;

private List<String> outputFiles;
private Property<List<String>> outputFiles;

@Override
public ScriptOutput run(RunContext runContext) throws Exception {
List<String> loginCommands = this.getLoginCommands(runContext);

var renderedEnv = runContext.render(this.env).asMap(String.class, String.class);
var renderedOutputFiles = runContext.render(this.outputFiles).asList(String.class);

CommandsWrapper commands = new CommandsWrapper(runContext)
.withWarningOnStdErr(true)
Expand All @@ -189,7 +190,7 @@ public ScriptOutput run(RunContext runContext) throws Exception {
.withEnv(renderedEnv.isEmpty() ? null : renderedEnv)
.withNamespaceFiles(namespaceFiles)
.withInputFiles(inputFiles)
.withOutputFiles(outputFiles);
.withOutputFiles(renderedOutputFiles.isEmpty() ? null : renderedOutputFiles);

return commands.run();
}
Expand Down

0 comments on commit e8cf372

Please sign in to comment.