Skip to content

Commit 0b31cb4

Browse files
committed
Which(1) already checks if file is executable.
1 parent 749c362 commit 0b31cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bashttpd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ elif [ -f ${URL_PATH} -a ! -r ${URL_PATH} ]; then
101101
elif [ -d ${URL_PATH} ]; then
102102
# Return 200 for directory listings.
103103
# If `tree` is installed, use that for pretty output.
104-
if [ -x "$( which tree )" ]; then
104+
if which tree >/dev/null; then
105105
CONTENT_TYPE="text/html"
106106
CONTENT_BODY=$( tree -H "" -L 1 --du -D ${URL_PATH} )
107107
else

0 commit comments

Comments
 (0)