Skip to content

Commit

Permalink
Fix bin detection
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Oct 14, 2021
1 parent 98fe6c1 commit 889bbed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/dep
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 889bbed

Please sign in to comment.