Skip to content

Commit

Permalink
Merge branch 'main' into astro-dot-session
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic authored Dec 10, 2024
2 parents f45962d + f6c4214 commit 5a985ac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-worms-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes astro info copy to clipboard process not returning to prompt in certain cases.
5 changes: 5 additions & 0 deletions .changeset/wild-ducks-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/upgrade': patch
---

Fixes a bug that caused registry URLs that specify a port to be incorrectly detected as offline.
4 changes: 2 additions & 2 deletions packages/astro/src/cli/info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/upgrade/src/actions/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down

0 comments on commit 5a985ac

Please sign in to comment.