You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by np...@apache.org on 2018/01/16 11:39:36 UTC

[sling-org-apache-sling-pipes] 01/02: SLING-7314 add dryRun handling for path pipe

This is an automated email from the ASF dual-hosted git repository.

npeltier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-pipes.git

commit 4c3142554145e52d005410af756087c711f6bb1a
Author: npeltier <pe...@gmail.com>
AuthorDate: Mon Jan 15 22:47:47 2018 +0100

    SLING-7314 add dryRun handling for path pipe
---
 src/main/java/org/apache/sling/pipes/internal/PathPipe.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/pipes/internal/PathPipe.java b/src/main/java/org/apache/sling/pipes/internal/PathPipe.java
index 795dfae..6e4918c 100644
--- a/src/main/java/org/apache/sling/pipes/internal/PathPipe.java
+++ b/src/main/java/org/apache/sling/pipes/internal/PathPipe.java
@@ -70,7 +70,10 @@ public class PathPipe extends BasePipe {
         String expression = getExpr();
         try {
             String path = expression.startsWith(SLASH) ? expression : getInput().getPath() + SLASH + expression;
-            output = Collections.singleton(ResourceUtil.getOrCreateResource(resolver, path, resourceType, intermediateType, autosave)).iterator();
+            logger.info("creating path {}", path);
+            if (!isDryRun()) {
+                output = Collections.singleton(ResourceUtil.getOrCreateResource(resolver, path, resourceType, intermediateType, autosave)).iterator();
+            }
         } catch (PersistenceException e){
             logger.error ("Not able to create path {}", expression, e);
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.