Test
This commit is contained in:
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user