mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-16 13:50:14 +08:00
downloader
This commit is contained in:
parent
592d28044e
commit
140cd538b5
@ -104,20 +104,13 @@ suspend fun HttpClient.downloadMavenPomAsString(
|
|||||||
version: String
|
version: String
|
||||||
):String{
|
):String{
|
||||||
return kotlin.runCatching {
|
return kotlin.runCatching {
|
||||||
Http.get<String>(
|
this.get<String>(
|
||||||
aliyunPath.buildPath(groupName,projectName,version,"pom")
|
aliyunPath.buildPath(groupName,projectName,version,"pom")
|
||||||
)
|
)
|
||||||
}.getOrElse {
|
}.getOrElse {
|
||||||
try {
|
this.get(
|
||||||
Http.get(
|
|
||||||
aliyunPath.buildPath(groupName, projectName, version, "pom")
|
aliyunPath.buildPath(groupName, projectName, version, "pom")
|
||||||
)
|
)
|
||||||
}catch (e:Exception){
|
|
||||||
if(e.message?.contains("404 Not Found") == true) {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
throw e
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user