From 020dcab00f8a86ced4ea52cac7e7a3c4bb40ba67 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Tue, 3 Feb 2026 20:46:57 +0000 Subject: [PATCH] Fix paths in both installed_plugins.json and known_marketplaces.json Both files contain hardcoded home directory paths that need to be replaced with the remote user's home directory. --- dot_local/bin/executable_sync-dotfiles-remote.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dot_local/bin/executable_sync-dotfiles-remote.sh b/dot_local/bin/executable_sync-dotfiles-remote.sh index 1a0e746..5240357 100644 --- a/dot_local/bin/executable_sync-dotfiles-remote.sh +++ b/dot_local/bin/executable_sync-dotfiles-remote.sh @@ -22,9 +22,16 @@ ssh "$REMOTE" 'cd ~ && tar -xzf /tmp/dotfiles.tar.gz && rm /tmp/dotfiles.tar.gz' echo "Extracting Claude marketplaces..." ssh "$REMOTE" 'mkdir -p ~/.claude/plugins && tar -xzf /tmp/claude-marketplaces.tar.gz -C ~/.claude/plugins && rm /tmp/claude-marketplaces.tar.gz' -echo "Fixing plugin paths for remote home directory..." -ssh "$REMOTE" "sed -i.bak 's|$LOCAL_HOME|\$HOME|g' ~/.claude/plugins/installed_plugins.json && rm -f ~/.claude/plugins/installed_plugins.json.bak" -# Expand $HOME on remote -ssh "$REMOTE" 'sed -i.bak "s|\$HOME|$HOME|g" ~/.claude/plugins/installed_plugins.json && rm -f ~/.claude/plugins/installed_plugins.json.bak' +echo "Fixing paths for remote home directory..." +# Fix paths in all Claude plugin JSON files +ssh "$REMOTE" " + for f in ~/.claude/plugins/installed_plugins.json ~/.claude/plugins/known_marketplaces.json; do + if [ -f \"\$f\" ]; then + sed -i.bak 's|$LOCAL_HOME|\$HOME|g' \"\$f\" + sed -i.bak \"s|\\\$HOME|\$HOME|g\" \"\$f\" + rm -f \"\$f.bak\" + fi + done +" echo "Done! Dotfiles and Claude marketplaces synced to $REMOTE"