Comments (8)
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.
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... 😓@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.
Good idea, @jrfnl!
from composer-install.
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.
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.
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:
- the fork, I have all the infos I need (https://github.com/Kocal/composer-install/runs/2050396017?check_suite_focus=true#step:4:12):
- the other private repo, I have literally nothing:
I don't know why do we have different outputs... Maybe because we run the action on the action's repo?
from composer-install.
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.
@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)
- Heads-up: upcoming (helpful) change in setupPHP HOT 1
- Do not depend on awk and perl
- CI `run` job only tests with lock files HOT 5
- Support `composer-bin` commands like `composer bin [folder] install` HOT 4
- failed to open stream HOT 1
- Cannot find composer.json HOT 4
- Yaml is invalid? HOT 5
- Error: The process '/usr/local/bin/composer' failed with exit code 1 HOT 4
- Add `retries:` input HOT 2
- Add `--no-audit` to default options used ? HOT 1
- Better cache busting when using `dependency-versions: 'highest'` HOT 3
- `set-output` function is deprecated HOT 1
- "Could not authenticate against github.com" HOT 2
- Ability to swap out actions/cache for the faster alternative buildjet/cache HOT 1
- Failure to restore cache causes the GitHub Action step to run indefinitely HOT 8
- File "./composer.json" cannot be found in the current directory HOT 2
- locked version vs. missing lock file HOT 1
- Misleading error message when validate_composer fails due to missing HOME/COMPOSER_HOME HOT 1
- Switch to actions/cache@v4
- [support] Create new tagged release HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composer-install.