From 398d1e120b1fce3c21e97a31e813d4bcebc946cc Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Wed, 25 Feb 2026 18:55:30 +0530 Subject: [PATCH] Ensure input file exists before copying Resolves: https://github.com/aboutcode-org/scancode-action/issues/33 Signed-off-by: Keshav Priyadarshi --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d747c69..3c7e7e9 100644 --- a/action.yml +++ b/action.yml @@ -150,7 +150,7 @@ runs: else echo "Input directory '$SOURCE_PATH' is empty, nothing to copy." fi - else + elif [[ -f "$SOURCE_PATH" ]]; then echo "Copying file: $SOURCE_PATH → $DESTINATION_PATH" cp "$SOURCE_PATH" "$DESTINATION_PATH" fi