Skip to content

Commit 0278646

Browse files
committed
don't fail if directory doesn't exist
1 parent 3f44688 commit 0278646

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tedge/sm-plugins/archive

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ case "$COMMAND" in
9494
prepare)
9595
;;
9696
list)
97-
find "$(get_software_dir)" -type f -name "package" | while read -r ITEM; do
97+
DIR=$(get_software_dir)
98+
if [ ! -d "$DIR" ]; then
99+
echo "archive directory does not exist. path=$DIR" >&2
100+
exit "$EXIT_OK"
101+
fi
102+
find "$DIR" -type f -name "package" | while read -r ITEM; do
98103
head -n1 "$ITEM"
99104
done
100105
;;

0 commit comments

Comments
 (0)