#!/bin/bash
# Managed by MiniMax Code. Do not edit.
#
# Recoverable-delete shim: resolves ahead of /bin/rm on the agent's PATH so
# every delete — including those reached through xargs, find -exec, or a
# generated script — lands in the platform trash instead of being unlinked.
#
# This file is NOT on the user's interactive PATH; it applies to agent bash only.
set -u
shim_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
trash_bin="$shim_dir/../bin/mavis-trash"
if [ ! -x "$trash_bin" ]; then
  echo "rm: recoverable-delete runtime is missing at $trash_bin" >&2
  echo "rm: refusing to fall back to an unrecoverable delete" >&2
  exit 1
fi
exec "$trash_bin" "$@"
