deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.52k stars 1.48k forks source link

Deploy fails on Cygwin #2729

Closed lucaciotti closed 6 days ago

lucaciotti commented 2 years ago

WIth the last update my deploy cmd fails:

Using D:\myProjects\/vendor/bin/dep

dir=$(cd "${0%[/\]*}" > /dev/null; cd "../deployer/deployer/bin" && pwd)

if [ -d /proc/cygdrive ]; then case $(which php) in $(readlink -n /proc/cygdrive)/*)

We are in Cygwin using Windows php, so the path must be translated

        dir=$(cygpath -m "$dir");
        ;;
esac

fi

"${dir}/dep" "$@"

Upvote & Fund

Fund with Polar

antonmedv commented 2 years ago

Can’t tell what is wrong.

lucaciotti commented 2 years ago

Ok I found out what disturbs my deploy ...

I state that I use Laravel 8 and I use your package for the deployment. The command I used for the deployment is:

vendor/bin/dep deploy production

Now the "sh" command contained in bin calls the execution of "deployer/bin/dep" ... here since beta 28 a block of code "// Find project-local Deployer installation" has been inserted. image

However here the code calls the dep.sh file contained in "vendor/bin" and everything crashes ...

This piece of code is not clear to me.

Hope it helps to fix the problem.

Schrank commented 2 years ago

The code is to have a global deployer installation but the correct version locally. It seems you have a deploy script(?), the question is, where is it and why is it used. If the name is dep.sh it shouldn’t be used.

Can you please rename the file (my-personal-sh something which doesn’t contain dep 😅) and try again?

github-actions[bot] commented 6 days ago

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: [https://github.com/deployphp/deployer/discussions/3888]