mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
Merge branch 'main' into astro-dot-session
This commit is contained in:
commit
5a985acd6c
4 changed files with 14 additions and 4 deletions
5
.changeset/shy-worms-talk.md
Normal file
5
.changeset/shy-worms-talk.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes astro info copy to clipboard process not returning to prompt in certain cases.
|
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.
|
|
@ -66,7 +66,7 @@ export async function copyToClipboard(text: string, force?: boolean) {
|
|||
// Unix: check if a supported command is installed
|
||||
|
||||
const unixCommands: Array<[string, Array<string>]> = [
|
||||
['xclip', ['-sel', 'clipboard', '-l', '1']],
|
||||
['xclip', ['-selection', 'clipboard', '-l', '1']],
|
||||
['wl-copy', []],
|
||||
];
|
||||
for (const [unixCommand, unixArgs] of unixCommands) {
|
||||
|
@ -101,7 +101,7 @@ export async function copyToClipboard(text: string, force?: boolean) {
|
|||
}
|
||||
|
||||
try {
|
||||
const result = spawnSync(command, args, { input: text });
|
||||
const result = spawnSync(command, args, { input: text, stdio: ['pipe', 'ignore', 'ignore'] });
|
||||
if (result.error) {
|
||||
throw result.error;
|
||||
}
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue