Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/carried-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sync_carried_plugins() {

if [ "$DRY_RUN" = true ]; then
echo -e "${BLUE}[dry-run]${NC} mkdir -p $target_dir"
echo -e "${BLUE}[dry-run]${NC} rsync -a --delete $source_dir/ $target_dir/"
echo -e "${BLUE}[dry-run]${NC} rsync -a --no-owner --no-group --delete $source_dir/ $target_dir/"
echo -e "${BLUE}[dry-run]${NC} $WP_CMD plugin activate $slug --path=$SITE_PATH $WP_ROOT_FLAG"
continue
fi
Expand All @@ -48,7 +48,7 @@ sync_carried_plugins() {
fi

mkdir -p "$target_dir"
rsync -a --delete "$source_dir/" "$target_dir/"
rsync -a --no-owner --no-group --delete "$source_dir/" "$target_dir/"
activate_plugin "$slug"
fix_ownership "$target_dir"

Expand Down
10 changes: 8 additions & 2 deletions lib/wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,16 @@ update_plugin_to_latest_tag() {
fix_ownership "$plugin_dir"
}

# Set file ownership to www-data (no-op in local mode).
# Normalize web-tree ownership or group permissions (no-op in local mode).
fix_ownership() {
if [ "$LOCAL_MODE" = false ]; then
run_cmd chown -R www-data:www-data "$1"
if [ "$(id -u)" -eq 0 ]; then
run_cmd chown -R www-data:www-data "$1"
elif [ "$DRY_RUN" = true ]; then
echo -e "${BLUE}[dry-run]${NC} normalize group-writable permissions for $1"
else
service_dir_normalize_perms "$1"
fi
fi
}

Expand Down
2 changes: 1 addition & 1 deletion tests/carried-claude-code-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUNTIME=claude-code
output="$(sync_carried_plugins)"

case "$output" in
*"Syncing carried plugin: ai-provider-for-claude-code"*"wp plugin activate ai-provider-for-claude-code"*) ;;
*"Syncing carried plugin: ai-provider-for-claude-code"*"rsync -a --no-owner --no-group --delete"*"wp plugin activate ai-provider-for-claude-code"*) ;;
*)
printf 'Expected Claude Code carried plugin sync, got:\n%s\n' "$output" >&2
exit 1
Expand Down
Loading