Repository navigation
fix: show curl errors when downloading gitlab_templates files - #186
Merged
Merged
Conversation
## Short Summary (TL;DR) Make `symlink-project`, `expand-composer-json`, `phpcs`, `phpcbf` and `phpstan` fail with the HTTP error instead of saving an error page as the downloaded file. ## The Issue - Related to ddev/ddev-nvm#6 `curl -OL` without `--fail` saves a 4xx/5xx response from git.drupalcode.org as `symlink_project.php`, `phpcs.xml.dist`, etc. For `phpcs`, `phpcbf` and `phpstan` the broken file stays in the project, because the `test -e` check skips the download next time. ## How This PR Solves The Issue Use `curl -fsSL -O`. On an HTTP error curl prints the status, writes no file, and the command stops because of `set -e`. ## Manual Testing Instructions ```bash ddev add-on get ddev/ddev-drupal-contrib --pr 186 ddev restart ddev symlink-project ddev phpcs --version ``` ## Automated Testing Overview No new tests, the existing tests run these commands. ## Release/Deployment Notes None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Summary (TL;DR)
Make
symlink-project,expand-composer-json,phpcs,phpcbfandphpstanfail with the HTTP error instead of saving an error page as the downloaded file.The Issue
ddev restartddev-nvm#6curl -OLwithout--failsaves a 4xx/5xx response from git.drupalcode.org assymlink_project.php,phpcs.xml.dist, etc. Forphpcs,phpcbfandphpstanthe broken file stays in the project, because thetest -echeck skips the download next time.How This PR Solves The Issue
Use
curl -fsSL -O. On an HTTP error curl prints the status, writes no file, and the command stops because ofset -e.Manual Testing Instructions
Automated Testing Overview
No new tests, the existing tests run these commands.
Release/Deployment Notes
None.