Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jun 11, 2022. It is now read-only.
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Output a clearer error message for detect failures #186

Copy link
Copy link
@edmorley

Description

@edmorley
Issue body actions

Currently if bin/detect for this buildpack fails to find a package.json, the build outputs shows:

$ mkdir -p testapp-cra && cd $_ && git init && h create
$ h buildpacks:add mars/create-react-app
$ touch foo
$ git add -A && git commit -m '.' && git push heroku main
...
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/mars/create-react-app.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed

If bin/detect were to instead output a package.json not found in app source type error message to stderr (must be stderr or the build system ignores it), then that would be shown in the output instead.

Examples of what other buildpacks output:
https://github.com/heroku/heroku-buildpack-nodejs/blob/master/bin/detect
https://github.com/heroku/heroku-buildpack-php/blob/main/bin/detect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.