diff options
-rw-r--r-- | .changeset/shy-worms-talk.md | 5 | ||||
-rw-r--r-- | packages/astro/src/cli/info/index.ts | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.changeset/shy-worms-talk.md b/.changeset/shy-worms-talk.md new file mode 100644 index 000000000..c22501e2d --- /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 348d2fae3..aca66ad71 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<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; } |