Coder Social home page Coder Social logo

Comments (8)

jrfnl avatar jrfnl commented on May 27, 2024 3

Just a heads-up: I ran into the 'usr/local/bin/composer' failed with exit code 1 error myself today.
In my case, the cause was a silly typo in the composer.json.

Might it be an idea to run composer validate --strict before running the composer install and to exit with the output of the validate command if that fails ? That would probably catch most issues and should show a more helpful error message.

from composer-install.

ramsey avatar ramsey commented on May 27, 2024 1

Comment from @Kocal on #58 (comment):

Hum, I'm trying to use the new release since #93 has been merged, but I have error The process '/usr/local/bin/composer' failed with exit code 1. That's weird since checks from #93 were all green... 😓

image

@ramsey do you have an idea how can I debug this? Since it's working on the action's CI but not on other CI, I don't know where and how to start 😞
Thanks!

from composer-install.

ramsey avatar ramsey commented on May 27, 2024 1

Good idea, @jrfnl!

from composer-install.

ramsey avatar ramsey commented on May 27, 2024 1

The latest version (2.0.1) includes composer.json validation and emits an error in the GitHub Action runner, if it encounters a validation error.

from composer-install.

ramsey avatar ramsey commented on May 27, 2024

To clarify, I don't think these two errors are related, but we do need some better error messaging when composer fails like this, to make it easier to debug.

from composer-install.

Kocal avatar Kocal commented on May 27, 2024

I started working on this and I found something interesting.

Using the following step on two repositories (my fork Kocal#2 and another private repo which needs working-directory)

-   uses: ramsey/composer-install@v1
    with:
        dependency-versions: locked
        composer-options: --unknown-option

I'm having different outputs:

I don't know why do we have different outputs... Maybe because we run the action on the action's repo?

from composer-install.

alexander-schranz avatar alexander-schranz commented on May 27, 2024

The validate command will fail in none libraries like a symfony based project e.g.:

composer create-project symfony/skeleton
cd skeleton
composer validate --strict

Will fail with:

name : The property name is required
description : The property description is required

Also in our cases linting is an own task in our CIs, so I would not add this as part of the installation.

from composer-install.

jrfnl avatar jrfnl commented on May 27, 2024

@alexander-schranz Just composer validate (without the strict) should get round that and should still provide more usable error messages, so I think it's still a viable solution.

from composer-install.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.