瀏覽代碼

fixed issue #486

Brikou CARRE 13 年之前
父節點
當前提交
3ae860f485
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/Composer/Installer/LibraryInstaller.php

+ 8 - 1
src/Composer/Installer/LibraryInstaller.php

@@ -169,7 +169,14 @@ class LibraryInstaller implements InstallerInterface
                 }
                 file_put_contents($link, $this->generateWindowsProxyCode($bin, $link));
             } else {
-                symlink($bin, $link);
+                try {
+                    // under linux symlinks are not always supported for example
+                    // when using it in smbfs mounted folder
+                    symlink($bin, $link);
+                } catch (\ErrorException $e) {
+                    file_put_contents($link, $this->generateUnixyProxyCode($bin, $link));
+                }
+
             }
             chmod($link, 0755);
         }