mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 00:50:07 +08:00
Using path.resolve instead
This commit is contained in:
+3
-3
@@ -274,7 +274,7 @@ async function reconcilePluginDeps({skipLocal, skipRemote, dryRun, upgradeRemote
|
||||
}
|
||||
|
||||
async function createSeedPlugin() {
|
||||
const pluginsDir = path.join(dir, 'plugins');
|
||||
const pluginsDir = path.resolve(__dirname, '..', 'plugins');
|
||||
|
||||
function pluginNameExists(pluginName) {
|
||||
const pluginNames = fs.readdirSync(pluginsDir);
|
||||
@@ -321,7 +321,7 @@ async function createSeedPlugin() {
|
||||
// Creating plugin seed
|
||||
//==============================================================================
|
||||
|
||||
const seedPlugin = path.join(dir, 'bin/templates/plugin');
|
||||
const seedPlugin = path.join(__dirname, 'templates/plugin');
|
||||
const newPluginPath = path.join(pluginsDir, answers.pluginName);
|
||||
|
||||
if (fs.existsSync(seedPlugin)) {
|
||||
@@ -355,7 +355,7 @@ async function createSeedPlugin() {
|
||||
|
||||
// Let's add this to the plugins.json
|
||||
if (answers.addPluginsJson) {
|
||||
const pluginsJson = path.join(dir, 'plugins.json');
|
||||
const pluginsJson = path.resolve(__dirname, '..', 'plugins.json');
|
||||
|
||||
fs.readJson(pluginsJson)
|
||||
.then((j) => {
|
||||
|
||||
Reference in New Issue
Block a user