Skip to content

Commit 9a1a642

Browse files
committed
Does a better job checking for composer-installed phpdoc.
1 parent ddb382e commit 9a1a642

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

docs-generate

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,18 @@ fi
2626
DIR="$( cd -P "$( dirname "$0" )"/.. >/dev/null 2>&1 && pwd )"
2727
CFG_FILE="$DIR/Config/phpdoc.xml"
2828

29-
bin/phpdoc.php --configuration="${CFG_FILE}" "$@"
29+
# Bail out if phpcs isn't available to us
30+
PHPDOC="$( which phpdoc )"
31+
if [ $? -gt 0 ]; then
32+
PHPDOC="$BIN_DIR/phpdoc"
33+
test -x $PHPDOC
34+
fi
35+
if [ $? -gt 0 ]; then
36+
echo "!! The 'phpdoc' command was not found on this system."
37+
echo ""
38+
exit 1
39+
fi
40+
echo "## Found phpdoc at: ${PHPDOC}"
41+
42+
43+
$PHPDOC --configuration="${CFG_FILE}" "$@"

0 commit comments

Comments
 (0)