Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Jephté Clain | 2687e72643 | |
Jephté Clain | 3ac6a38e25 |
26
dk
26
dk
|
@ -2099,8 +2099,10 @@ function auto_composer() {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
local use_image
|
local use_runphp use_image
|
||||||
if [ "$COMPOSER_PHP" == force -o "$COMPOSER_PHP" == any ]; then
|
if [ "$COMPOSER_PHP" == runphp ]; then
|
||||||
|
use_runphp=1
|
||||||
|
elif [ "$COMPOSER_PHP" == force -o "$COMPOSER_PHP" == any ]; then
|
||||||
use_image=1
|
use_image=1
|
||||||
elif [ "$COMPOSER_PHP" == none -o "$COMPOSER_PHP" == system ]; then
|
elif [ "$COMPOSER_PHP" == none -o "$COMPOSER_PHP" == system ]; then
|
||||||
COMPOSER_PHP=none
|
COMPOSER_PHP=none
|
||||||
|
@ -2121,7 +2123,7 @@ exit((PHP_VERSION_ID > $version)? 0: 1);
|
||||||
*) ewarn "Erreur lors du lancement de PHP: est-il installé? Vous pouvez utiliser COMPOSER_PHP=any";;
|
*) ewarn "Erreur lors du lancement de PHP: est-il installé? Vous pouvez utiliser COMPOSER_PHP=any";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ -n "$use_image" -o "$COMPOSER_PHP" == none ]; then
|
if [ -n "$use_runphp" -o -n "$use_image" -o "$COMPOSER_PHP" == none ]; then
|
||||||
: # ok, on a déjà décidé
|
: # ok, on a déjà décidé
|
||||||
elif [ -z "$COMPOSER_PHP" ]; then
|
elif [ -z "$COMPOSER_PHP" ]; then
|
||||||
# pas de version minimum, tester simplement la valeur de COMPOSER_IMAGE
|
# pas de version minimum, tester simplement la valeur de COMPOSER_IMAGE
|
||||||
|
@ -2143,7 +2145,23 @@ exit((PHP_VERSION_ID < $version)? 0: 1);
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$use_image" ]; then
|
if [ -n "$use_runphp" ]; then
|
||||||
|
(
|
||||||
|
export PROJDIR="$(pwd)"
|
||||||
|
export RUNPHP_STANDALONE=
|
||||||
|
RUNPHP=; DIST=; REGISTRY=
|
||||||
|
if [ -f "$PROJDIR/.runphp.conf" ]; then
|
||||||
|
source "$PROJDIR/.runphp.conf"
|
||||||
|
[ -n "$RUNPHP" ] && exec "$PROJDIR/$RUNPHP" composer "$@"
|
||||||
|
elif [ -f "$PROJDIR/sbin/runphp" ]; then
|
||||||
|
exec "$PROJDIR/sbin/runphp" composer "$@"
|
||||||
|
elif [ -f "$PROJDIR/runphp" ]; then
|
||||||
|
exec "$PROJDIR/runphp" composer "$@"
|
||||||
|
fi
|
||||||
|
exec runphp composer "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
elif [ -n "$use_image" ]; then
|
||||||
[ "$COMPOSER_IMAGE" != none ] || die "Vous devez spécifier l'image à utiliser pour composer"
|
[ "$COMPOSER_IMAGE" != none ] || die "Vous devez spécifier l'image à utiliser pour composer"
|
||||||
|
|
||||||
local PREVIOUS_DOCKER_MACHINE_NAME="$DOCKER_MACHINE_NAME"
|
local PREVIOUS_DOCKER_MACHINE_NAME="$DOCKER_MACHINE_NAME"
|
||||||
|
|
Loading…
Reference in New Issue