(id: string)
| 174 | } |
| 175 | |
| 176 | async removeJava(id: string) { |
| 177 | const java = this.getJava(id); |
| 178 | if (!java) throw new Error($t("TXT_CODE_77ce8542")); |
| 179 | |
| 180 | // if (java.info.downloading) throw new Error($t("TXT_CODE_887fee99")); |
| 181 | if (java.usingInstances.length) throw new Error($t("TXT_CODE_ea8ea5d1")); |
| 182 | |
| 183 | let javaPath = java.path; |
| 184 | if (!javaPath) throw new Error($t("TXT_CODE_82c8bca3")); |
| 185 | |
| 186 | await fs.remove(javaPath); |
| 187 | this.javaList.delete(id); |
| 188 | |
| 189 | return true; |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | const javaManager = new JavaManager(); |
no test coverage detected