fix plugin installing
This commit is contained in:
@@ -86,11 +86,11 @@ export class GitUpdater{
|
|||||||
async cloneRepo(from:string, force:boolean = false):Promise<RepoFolderStatus> {
|
async cloneRepo(from:string, force:boolean = false):Promise<RepoFolderStatus> {
|
||||||
if(force){
|
if(force){
|
||||||
await rmrf(this.folderPath)
|
await rmrf(this.folderPath)
|
||||||
await fs.mkdir(this.folderPath)
|
await fs.mkdir(this.folderPath, {recursive: true})
|
||||||
}
|
}
|
||||||
const status = await this.getStatus()
|
const status = await this.getStatus()
|
||||||
if(!status.exists){
|
if(!status.exists){
|
||||||
await fs.mkdir(this.folderPath)
|
await fs.mkdir(this.folderPath, {recursive: true})
|
||||||
}
|
}
|
||||||
if(!status.empty){
|
if(!status.empty){
|
||||||
logger.error("The folder "+this.folderPath+" is not empty. Not cloning! Pass the force parameter to override this check")
|
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[] {
|
exportRPCs(): socketioRPC[] {
|
||||||
return [{
|
return [{
|
||||||
name: 'installPlugin',
|
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',
|
type: 'call',
|
||||||
visibility: 'private'
|
visibility: 'private'
|
||||||
},{
|
},{
|
||||||
|
|||||||
Reference in New Issue
Block a user