NIFI-1514 Fixed ExecuteStreamCommand when expressions in command arguments are used, contents are not split by command separator

This closes #223.

Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
Michal Klempa 2016-02-15 21:38:26 +01:00 committed by Aldrin Piri
parent 6c2ba997a0
commit c2998a71ec
1 changed files with 2 additions and 2 deletions

View File

@ -299,11 +299,11 @@ public class ExecuteStreamCommand extends AbstractProcessor {
final String executeCommand = context.getProperty(EXECUTION_COMMAND).evaluateAttributeExpressions(inputFlowFile).getValue();
args.add(executeCommand);
final String commandArguments = context.getProperty(EXECUTION_ARGUMENTS).getValue();
final String commandArguments = context.getProperty(EXECUTION_ARGUMENTS).evaluateAttributeExpressions(inputFlowFile).getValue();
final boolean ignoreStdin = Boolean.parseBoolean(context.getProperty(IGNORE_STDIN).getValue());
if (!StringUtils.isBlank(commandArguments)) {
for (String arg : ArgumentUtils.splitArgs(commandArguments, context.getProperty(ARG_DELIMITER).getValue().charAt(0))) {
args.add(context.newPropertyValue(arg).evaluateAttributeExpressions(inputFlowFile).getValue());
args.add(arg);
}
}
final String workingDir = context.getProperty(WORKING_DIR).evaluateAttributeExpressions(inputFlowFile).getValue();