From 40cab0a7610f6f936b829677cbeae60bec03ecc8 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 23 May 2026 22:01:00 +0000 Subject: [PATCH] fix(ci): use rm+mv in build_ui.sh so dest dir need not pre-exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After removing litellm/proxy/_experimental/out/ from source control (LIT-2815), a fresh CI checkout no longer contains that directory. build_ui.sh used `cp -r ./out/* ` which fails when does not exist. Replace with `rm -rf && mv ./out `, which works whether or not the destination exists — identical to the approach already used in the e2e_ui_testing CircleCI job (see config.yml comment). https://claude.ai/code/session_01JVLLUH66aUXF9kxoHcYxWu --- ui/litellm-dashboard/build_ui.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ui/litellm-dashboard/build_ui.sh b/ui/litellm-dashboard/build_ui.sh index aa346c12edc..d85ef775859 100755 --- a/ui/litellm-dashboard/build_ui.sh +++ b/ui/litellm-dashboard/build_ui.sh @@ -49,13 +49,11 @@ if [ $? -eq 0 ]; then # Specify the destination directory destination_dir="../../litellm/proxy/_experimental/out" - # Remove existing files in the destination directory - rm -rf "$destination_dir"/* - - # Copy the contents of the output directory to the specified destination - cp -r ./out/* "$destination_dir" - - rm -rf ./out + # Replace destination atomically so it works whether or not the directory + # previously existed (rm+mv avoids the cp-as-child issue when the dest dir + # is pre-existing, and avoids "no such file" when it does not exist). + rm -rf "$destination_dir" + mv ./out "$destination_dir" echo "Deployment completed." else