Commit 513037d9 by Qiang Xue

bug fix.

parent eb39d1ff
......@@ -95,7 +95,7 @@ class Installer extends LibraryInstaller
}
$path = $fs->normalizePath($path);
if (strpos($path . '/', $vendorDir . '/') === 0) {
return ["@$name" => '<vendor-dir>/' . substr($path, strlen($vendorDir)) . '/' . $name];
return ["@$name" => '<vendor-dir>' . substr($path, strlen($vendorDir)) . '/' . $name];
} else {
return ["@$name" => $path . '/' . $name];
}
......
......@@ -29,7 +29,7 @@ class Plugin implements PluginInterface
$file = rtrim($composer->getConfig()->get('vendor-dir'), '/') . '/yiisoft/extensions.php';
if (!is_file($file)) {
@mkdir(dirname($file));
file_put_contents($file, "<?php\nreturn [];\n");
file_put_contents($file, "<?php\n\nreturn [];\n");
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment