fix plugin installing

This commit is contained in:
peter
2019-08-20 22:06:41 +02:00
parent 206bbf708c
commit 65400b2e2d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -86,11 +86,11 @@ export class GitUpdater{
async cloneRepo(from:string, force:boolean = false):Promise<RepoFolderStatus> {
if(force){
await rmrf(this.folderPath)
await fs.mkdir(this.folderPath)
await fs.mkdir(this.folderPath, {recursive: true})
}
const status = await this.getStatus()
if(!status.exists){
await fs.mkdir(this.folderPath)
await fs.mkdir(this.folderPath, {recursive: true})
}
if(!status.empty){
logger.error("The folder "+this.folderPath+" is not empty. Not cloning! Pass the force parameter to override this check")
+1 -1
View File
@@ -30,7 +30,7 @@ export class UpdateManager implements Plugin{
exportRPCs(): socketioRPC[] {
return [{
name: 'installPlugin',
rpc: async (name:string) => {return await this.installPlugin(name)},
rpc: async (name:string, force = false) => {return await this.installPlugin(name, force)},
type: 'call',
visibility: 'private'
},{