Browse Source

bug fix.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
513037d97d
  1. 2
      extensions/composer/Installer.php
  2. 2
      extensions/composer/Plugin.php

2
extensions/composer/Installer.php

@ -95,7 +95,7 @@ class Installer extends LibraryInstaller
} }
$path = $fs->normalizePath($path); $path = $fs->normalizePath($path);
if (strpos($path . '/', $vendorDir . '/') === 0) { if (strpos($path . '/', $vendorDir . '/') === 0) {
return ["@$name" => '<vendor-dir>/' . substr($path, strlen($vendorDir)) . '/' . $name]; return ["@$name" => '<vendor-dir>' . substr($path, strlen($vendorDir)) . '/' . $name];
} else { } else {
return ["@$name" => $path . '/' . $name]; return ["@$name" => $path . '/' . $name];
} }

2
extensions/composer/Plugin.php

@ -29,7 +29,7 @@ class Plugin implements PluginInterface
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yiisoft/extensions.php'; $file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yiisoft/extensions.php';
if (!is_file($file)) { if (!is_file($file)) {
@mkdir(dirname($file)); @mkdir(dirname($file));
file_put_contents($file, "<?php\nreturn [];\n"); file_put_contents($file, "<?php\n\nreturn [];\n");
} }
} }
} }

Loading…
Cancel
Save