symfony / recipes-contrib

Symfony Contrib Recipes Repositories

Home Page:https://github.com/symfony/recipes-contrib/blob/flex/main/RECIPES.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redirect when fetching the package require command in Travis build

Kryniol opened this issue · comments

Context

I'm working on a recipe for https://github.com/xsolve-pl/xsolve-face-validator-bundle. The build for my PR was green but I also wanted to test it manually. I've created new Symfony project but couldn't get it working locally so I checked the Travis build logs

The bug

The output from echo "$PACKAGES" was empty so I started digging and it seems that the curl command in the before_install section of the build configuration is hitting the 301 redirection so the output of curl -s $SYMFONY_ENDPOINT | sed -En 's/.*composer req "([^"]+)".*/\1/p' is always empty. Which means the build is always green because it doesn't add any packages to the composer.

How to fix

Either the URL in the Travis config should be corrected from symfony.sh to flex.symfony.com or -L option should be added to the curl command in order to follow the redirections. Or both 🙂