From 889bbedb7c73be7de5c18de33b7bf5c0e25fc727 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Thu, 14 Oct 2021 20:05:46 +0200 Subject: [PATCH] Fix bin detection --- bin/dep | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/dep b/bin/dep index f8e312919..005a1f0b2 100755 --- a/bin/dep +++ b/bin/dep @@ -38,13 +38,18 @@ if (empty($deployFile)) { $deployFile = $lookUp('deploy.yaml'); } -// Find project local Deployer installation +// Find project-local Deployer installation $binaries = [ dirname($deployFile) . '/vendor/bin/dep', dirname($deployFile) . '/deployer.phar', + getcwd() . '/vendor/bin/dep', + getcwd() . '/deployer.phar', ]; foreach ($binaries as $binary) { - if (file_exists($binary) && $binary !== __FILE__) { + if (file_exists($binary)) { + if (realpath($binary) === __FILE__) { + break; // Already required this binary + } require $binary; exit; }