case : Composer installs two packages, executes the script with vendor/bin/phinx.bat
in the way of cli, and returns an error: the function is defined repeatedly.
question : there are indeed env ()
functions inside both packages. But I"m executing a script for the phinx package, so why does another package load automatically?
and report errors twice.
specific description :
package:
-sharp!/usr/bin/env sh
dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../robmorgan/phinx/bin" && pwd)
if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
-sharp We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi
"${dir}/phinx" "$@"
< hr >