Skip to content

Commit

Permalink
Minor BC Break! Rename COMPOSER_BIN_DIR (available to non-PHP binarie…
Browse files Browse the repository at this point in the history
…s as env var since Composer 2.2.2) to COMPOSER_RUNTIME_BIN_DIR to fix a regression due to a name clash, fixes composer#10504
  • Loading branch information
Seldaek committed Feb 3, 2022
1 parent 62d5f4f commit 9b75042
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Composer/Installer/BinaryInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ protected function generateWindowsProxyCode($bin, $link)
return "@ECHO OFF\r\n".
"setlocal DISABLEDELAYEDEXPANSION\r\n".
"SET BIN_TARGET=%~dp0/".trim(ProcessExecutor::escape(basename($link, '.bat')), '"\'')."\r\n".
"SET COMPOSER_BIN_DIR=%~dp0\r\n".
"SET COMPOSER_RUNTIME_BIN_DIR=%~dp0\r\n".
"{$caller} \"%BIN_TARGET%\" %*\r\n";
}

return "@ECHO OFF\r\n".
"setlocal DISABLEDELAYEDEXPANSION\r\n".
"SET BIN_TARGET=%~dp0/".trim(ProcessExecutor::escape($binPath), '"\'')."\r\n".
"SET COMPOSER_BIN_DIR=%~dp0\r\n".
"SET COMPOSER_RUNTIME_BIN_DIR=%~dp0\r\n".
"{$caller} \"%BIN_TARGET%\" %*\r\n";
}

Expand Down Expand Up @@ -434,7 +434,7 @@ public function url_stat(\$path, \$flags)
esac
fi
export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
export COMPOSER_RUNTIME_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
# If bash is sourcing this file, we have to source the target as well
bashSource="\$BASH_SOURCE"
Expand Down

0 comments on commit 9b75042

Please sign in to comment.