deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Deploy fails on Cygwin

Open lucaciotti opened this issue 3 years ago • 3 comments

  • Deployer version: v7.0.0-beta.38
  • Deployment OS: Windows

WIth the last update my deploy cmd fails:

Using D:\myProjects<project>/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" "$@"

lucaciotti avatar Nov 03 '21 20:11 lucaciotti

Can’t tell what is wrong.

antonmedv avatar Nov 03 '21 20:11 antonmedv

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.

lucaciotti avatar Nov 14 '21 10:11 lucaciotti

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?

Schrank avatar Nov 14 '21 10:11 Schrank