fix plugin installing
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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'
|
||||
},{
|
||||
|
||||
Reference in New Issue
Block a user