소스 검색

Make unix proxies work with spaces in paths

Jordi Boggiano 12 년 전
부모
커밋
6206d0bc9c
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      src/Composer/Installer/LibraryInstaller.php

+ 5 - 5
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";
     }
 }