mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
bug fix.
This commit is contained in:
@ -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];
|
||||||
}
|
}
|
||||||
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user