From 6206d0bc9c631d62536e314584e1977085b66683 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 1 Nov 2012 17:17:47 +0100 Subject: [PATCH] Make unix proxies work with spaces in paths --- src/Composer/Installer/LibraryInstaller.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index ebb0a9769..5bbba4815 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -274,11 +274,11 @@ class LibraryInstaller implements InstallerInterface $binPath = $this->filesystem->findShortestPath($link, $bin); return "#!/usr/bin/env sh\n". - 'SRC_DIR=`pwd`'."\n". - 'cd `dirname "$0"`'."\n". + 'SRC_DIR="`pwd`"'."\n". + 'cd "`dirname "$0"`"'."\n". 'cd '.escapeshellarg(dirname($binPath))."\n". - 'BIN_TARGET=`pwd`/'.basename($binPath)."\n". - 'cd $SRC_DIR'."\n". - '$BIN_TARGET "$@"'."\n"; + 'BIN_TARGET="`pwd`/'.basename($binPath)."\"\n". + 'cd "$SRC_DIR"'."\n". + '"$BIN_TARGET" "$@"'."\n"; } }