Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add copy support for Wayland via wl-copy #11964

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

TheOtterlord
Copy link
Member

Changes

  • Silence errors from which when xclip is not found in the path
  • Adds astro info copy support for Wayland users via wl-copy

Testing

Manually tested as tests for the cli don't cover info and we don't have the right test environment.

Docs

No docs needed

Copy link

changeset-bot bot commented Sep 10, 2024

🦋 Changeset detected

Latest commit: 6478752

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release labels Sep 10, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@@ -86,8 +95,9 @@ async function copyToClipboard(text: string) {
if (!shouldCopy) return;

try {
execSync(command, {
input: text.trim(),
execSync(command.replaceAll('$0', text), {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit worried with doing a plain replacement this way that could expose executing arbitrary commands, but it looks like we don't accept any user input that reaches here, so probably fine for now.

@Princesseuh Princesseuh merged commit 06eff60 into main Sep 13, 2024
@Princesseuh Princesseuh deleted the theotterlord/wayland-info-copy branch September 13, 2024 11:45
@astrobot-houston astrobot-houston mentioned this pull request Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants