diff --git a/.changeset/shy-worms-talk.md b/.changeset/shy-worms-talk.md new file mode 100644 index 0000000000..c22501e2d2 --- /dev/null +++ b/.changeset/shy-worms-talk.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes astro info copy to clipboard process not returning to prompt in certain cases. diff --git a/packages/astro/src/cli/info/index.ts b/packages/astro/src/cli/info/index.ts index 348d2fae3b..aca66ad719 100644 --- a/packages/astro/src/cli/info/index.ts +++ b/packages/astro/src/cli/info/index.ts @@ -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]> = [ - ['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; }