Skip to content

Commit ea973df

Browse files
inqrphlAhmet Oeztuerksni
authored
do not run tree command at the end of the script (#301)
Co-authored-by: Ahmet Oeztuerk <[email protected]> Co-authored-by: Sven Nierlein <[email protected]>
1 parent d90bb14 commit ea973df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/snclient/t/scripts/check_files_recursive_generate_files.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ TODAY=$(date -d 'today 00:00:00' +%F)
4545
#echo "DIRECTORY_COUNT=${DIRECTORY_COUNT}"
4646
echo "ok - Generated $(( DIRECTORY_COUNT - 1 )) directories for testing"
4747

48-
echo "printing the tree of the files"
49-
tree ${TESTING_DIR}
48+
if command -v tree >/dev/null 2>&1; then
49+
echo "printing the tree of the files"
50+
tree ${TESTING_DIR}
51+
else
52+
echo "warning: tree command not found, skipping tree output"
53+
fi
5054
)
5155

5256
exit 0

0 commit comments

Comments
 (0)