Skip to content

Commit e24f040

Browse files
committed
verbose error message on bin/detect failure
1 parent d4336f0 commit e24f040

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# heroku-buildpack-php CHANGELOG
22

3+
## v141 (2018-08-??)
4+
5+
### CHG
6+
7+
- Verbose error messasge on `bin/detect` failure [David Zuelke]
8+
39
## v140 (2018-07-25)
410

511
### CHG

bin/detect

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
#!/usr/bin/env bash
22

3+
# convenience functions
4+
source "$(cd $(dirname $0); cd ..; pwd)"/bin/util/common.sh
5+
36
if [[ -f "$1/composer.json" || -f "$1/index.php" ]]; then
47
echo "PHP" && exit 0
58
else
6-
exit 1
9+
error <<-EOF
10+
Application not supported by this buildpack!
11+
12+
The 'heroku/php' buildpack is set on this application, but was
13+
unable to detect a PHP codebase.
14+
15+
A PHP app on Heroku requires a 'composer.json' at the root of
16+
the directory structure, or an 'index.php' for legacy behavior.
17+
18+
If you are trying to deploy a PHP application, ensure that one
19+
of these files is present at the top level directory.
20+
21+
If you are trying to deploy an application written in another
22+
language, you need to change the list of buildpacks set on your
23+
Heroku app using the 'heroku buildpacks' command.
24+
25+
For more information, refer to the following documentation:
26+
https://devcenter.heroku.com/articles/buildpacks
27+
https://devcenter.heroku.com/articles/php-support#activation
28+
EOF
729
fi

0 commit comments

Comments
 (0)