diff --git a/src/utils/container.rs b/src/utils/container.rs index 2d815ea..3938197 100644 --- a/src/utils/container.rs +++ b/src/utils/container.rs @@ -1718,8 +1718,9 @@ if [ -n "$AVOCADO_EXT_PATH_MOUNTS" ]; then target_path="$EXT_PREFIX/$ext_name" if [ -d "$mnt_path" ]; then - # Clear any stale files from a previous source type (e.g. package -> path switch) - rm -rf "$target_path" + # Create target if it doesn't exist. Avoid rm -rf because parallel + # containers share this volume and would race on the same paths. + # Stale package-sourced files are harmless — bindfs overlays them. mkdir -p "$target_path" if [ -n "$AVOCADO_HOST_UID" ] && [ -n "$AVOCADO_HOST_GID" ]; then if [ "$AVOCADO_HOST_UID" = "0" ] && [ "$AVOCADO_HOST_GID" = "0" ]; then @@ -1967,8 +1968,9 @@ if [ -n "$AVOCADO_EXT_PATH_MOUNTS" ]; then target_path="$EXT_PREFIX/$ext_name" if [ -d "$mnt_path" ]; then - # Clear any stale files from a previous source type (e.g. package -> path switch) - rm -rf "$target_path" + # Create target if it doesn't exist. Avoid rm -rf because parallel + # containers share this volume and would race on the same paths. + # Stale package-sourced files are harmless — bindfs overlays them. mkdir -p "$target_path" if [ -n "$AVOCADO_HOST_UID" ] && [ -n "$AVOCADO_HOST_GID" ]; then if [ "$AVOCADO_HOST_UID" = "0" ] && [ "$AVOCADO_HOST_GID" = "0" ]; then