From 668dc836324541a0bb432245dbf9085dcf7caefe Mon Sep 17 00:00:00 2001
From: Ander Punnar <ander@kvlt.ee>
Date: Tue, 2 Apr 2019 17:52:00 +0300
Subject: [PATCH] do not exit with non-zero if path does not exist or not
 directory

---
 cdist/conf/type/__clean_path/explorer/list | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/cdist/conf/type/__clean_path/explorer/list b/cdist/conf/type/__clean_path/explorer/list
index ef46887d..07d38127 100755
--- a/cdist/conf/type/__clean_path/explorer/list
+++ b/cdist/conf/type/__clean_path/explorer/list
@@ -20,11 +20,7 @@
 
 path="/$__object_id"
 
-if [ ! -d "$path" ]
-then
-    echo "$path is not a directory" >&2
-    exit 1
-fi
+[ ! -d "$path" ] && exit 0
 
 pattern="$( cat "$__object/parameter/pattern" )"