Skip to content

fix: guard against missing remote_clipboard.lua in migration#6196

Open
sridhar-3009 wants to merge 2 commits into
basecamp:devfrom
sridhar-3009:fix/migration-remote-clipboard-6143
Open

fix: guard against missing remote_clipboard.lua in migration#6196
sridhar-3009 wants to merge 2 commits into
basecamp:devfrom
sridhar-3009:fix/migration-remote-clipboard-6143

Conversation

@sridhar-3009

Copy link
Copy Markdown

Migration 1781587663.sh calls install -m 0644 "$provider_source" "$nvim_provider" without first checking whether $provider_source exists. When the omarchy-nvim package hasn't yet shipped remote_clipboard.lua, the install command fails silently — no error is logged, but the Neovim clipboard provider is never set up.

This adds an explicit [[ -f $provider_source ]] guard and prints a diagnostic message when the file is absent so users know what was skipped and why. The tmux OSC 52 configuration is unaffected and still runs unconditionally.

Closes #6143

Copilot AI review requested due to automatic review settings July 9, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the 1781587663.sh migration to avoid silently failing when the Neovim OSC52 clipboard provider source file is not present in the installed omarchy-nvim package, while still applying the tmux OSC 52 configuration change.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Add a [[ -f $provider_source ]] guard before copying remote_clipboard.lua into the user’s Neovim config.
  • Print a clear diagnostic when the provider source file is missing so users know what was skipped.
  • Keep the tmux terminal-features ",*:clipboard" update unconditional (still gated only by “already present” detection).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread migrations/1781587663.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 9, 2026 19:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread migrations/1781587663.sh
Comment on lines +11 to +25
mkdir -p "$(dirname "$nvim_provider")"
install -m 0644 "$provider_source" "$nvim_provider"

if [[ -f $nvim_options ]] && ! grep -qF 'config.remote_clipboard' "$nvim_options"; then
if tmp=$(mktemp); then
if ! {
printf '%s\n' 'require("config.remote_clipboard").setup()'
cat "$nvim_options"
} >"$tmp"; then
rm -f "$tmp"
elif ! mv "$tmp" "$nvim_options"; then
rm -f "$tmp"
fi
fi
fi
Comment thread migrations/1781587663.sh
Comment on lines +1 to +2
echo "Enable secure remote Neovim clipboard support"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration 1781587663 silently fails — remote_clipboard.lua missing from omarchy-nvim package

2 participants