mirror of https://github.com/apache/nifi.git
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:
parent
6c2ba997a0
commit
c2998a71ec
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue