[INS-2174] fixes create new plugin issue (#5473)

This commit is contained in:
Filipe Freire 2022-12-01 13:20:56 +00:00 committed by GitHub
parent 171674c80a
commit 327450cd77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -1,7 +1,6 @@
import fs from 'fs';
import mkdirp from 'mkdirp';
import path from 'path';
import rimraf from 'rimraf';
import { getDataDirectory } from '../common/electron-helpers';
@ -16,7 +15,6 @@ export async function createPlugin(
throw new Error(`Plugin already exists at "${pluginDir}"`);
}
rimraf.sync(pluginDir);
mkdirp.sync(pluginDir);
// Write package.json
fs.writeFileSync(

View File

@ -240,6 +240,7 @@ export const Plugins: FC<Props> = ({ settings }) => {
].join('\n'),
);
} catch (err) {
console.error(err);
showAlert({
title: 'Failed to Create Plugin',
message: err.message,