Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11391

Sling Pipes to support Output paramenter with hyphen

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • pipes
    • None

    Description

      Background

      It's not possible to output a variable containing a hyphen, like 'api-type'.

      pipe -u user:password \
      -c \
      -o apiType=content["api-type"] \
      pipe.txt 

      The 'apiType' will output empty value and in the logs pipe writes an error

      Caused by: org.apache.commons.jexl3.JexlException$Variable: org.apache.sling.pipes.internal.bindings.JxltEngine.parse@1:15 undefined variable api
          at org.apache.sling.pipes.internal.bindings.JxltEngine.parse(JxltEngine.java:41)
          at org.apache.sling.pipes.PipeBindings.internalEvaluate(PipeBindings.java:253)
          at org.apache.sling.pipes.PipeBindings.evaluate(PipeBindings.java:234)
          ... 162 common frames omitted 

       

      According to the docu "JEXL does not support variables with hyphens in them, e.g.". Seems like this is the cause for the issue.

      https://github.com/apache/sling-org-apache-sling-pipes/blob/master/src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java#L661 

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            lukianet Mariia Lukianets
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: