From 7c2954d349163ae1234ccd174295988710183372 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 4 Feb 2022 09:23:00 +0100 Subject: [PATCH] Minor BC Break! Rename COMPOSER_BIN_DIR available inside binaries to COMPOSER_RUNTIME_BIN_DIR (#10512) This was available to non-PHP binaries as env var since Composer 2.2.2, and the rename is needed to fix a regression due to a name clash. Fixes #10504 --- src/Composer/Installer/BinaryInstaller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Installer/BinaryInstaller.php b/src/Composer/Installer/BinaryInstaller.php index 7d5db0d2b..417e9be2b 100644 --- a/src/Composer/Installer/BinaryInstaller.php +++ b/src/Composer/Installer/BinaryInstaller.php @@ -235,14 +235,14 @@ class BinaryInstaller 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"; } @@ -434,7 +434,7 @@ if [ -d /proc/cygdrive ]; then 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"