(pkgName: string)
| 192 | |
| 193 | // remove a specified package. The packagename is selected e.g. in the help tree-view |
| 194 | public async removePackage(pkgName: string): Promise<boolean> { |
| 195 | const rPath = this.rHelp.rPath; |
| 196 | const args = ['--silent', '--no-echo', '--no-save', '--no-restore', '-e', `remove.packages('${pkgName}')`]; |
| 197 | const cmd = `${rPath} ${args.join(' ')}`; |
| 198 | const confirmation = 'Yes, remove package!'; |
| 199 | const prompt = `Are you sure you want to remove package ${pkgName}?`; |
| 200 | |
| 201 | if(await getConfirmation(prompt, confirmation, cmd)){ |
| 202 | await executeAsTask('Remove Package', rPath, args, true); |
| 203 | return true; |
| 204 | } else{ |
| 205 | return false; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | // actually install packages |
| 210 | // confirmation can be skipped (e.g. if the user has confimred before) |
no test coverage detected