mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
fix: correctly check isOnline with port (#12706)
This commit is contained in:
parent
316959355c
commit
f6c4214042
2 changed files with 7 additions and 2 deletions
5
.changeset/wild-ducks-decide.md
Normal file
5
.changeset/wild-ducks-decide.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/upgrade': patch
|
||||
---
|
||||
|
||||
Fixes a bug that caused registry URLs that specify a port to be incorrectly detected as offline.
|
|
@ -43,8 +43,8 @@ export async function verify(
|
|||
}
|
||||
|
||||
function isOnline(registry: string): Promise<boolean> {
|
||||
const { host } = new URL(registry);
|
||||
return dns.lookup(host).then(
|
||||
const { hostname } = new URL(registry);
|
||||
return dns.lookup(hostname).then(
|
||||
() => true,
|
||||
() => false,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue