From 12ea8a669db39d52b19e4c7351c53d36d17c1d99 Mon Sep 17 00:00:00 2001 From: Scion Date: Mon, 5 Jan 2026 10:02:50 -0800 Subject: [PATCH] Test --- npm/npm-push/action.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/npm/npm-push/action.yaml b/npm/npm-push/action.yaml index 1dce4be..cfd7212 100644 --- a/npm/npm-push/action.yaml +++ b/npm/npm-push/action.yaml @@ -30,10 +30,22 @@ runs: run: | # Ensure path starts with ./ so npm recognizes it as a file path TGZ_PATH="${{ inputs.tgz }}" + # Trim whitespace + TGZ_PATH=$(echo "$TGZ_PATH" | xargs) + + echo "Original path: '${{ inputs.tgz }}'" + echo "Trimmed path: '$TGZ_PATH'" + echo "First character: '${TGZ_PATH:0:1}'" + if [[ ! "$TGZ_PATH" =~ ^[./~] ]]; then + echo "Path does not start with . / or ~, adding ./ prefix" TGZ_PATH="./$TGZ_PATH" + else + echo "Path already starts with . / or ~, no prefix needed" fi + echo "Final path: '$TGZ_PATH'" + # Configure npm authentication for the registry (scoped to project) REGISTRY_PATH=$(echo "${{ inputs.registry }}" | sed -E 's|https?://||') npm config set --location=project registry "${{ inputs.registry }}"