mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix: normalize paths in cache actions to fix bootstrap detection
Path comparison was failing when registry had expanded paths (/home/runner/.ccache) but input had unexpanded paths (~/.ccache), causing bootstrap mode to not be detected. Now both restore and save actions consistently expand tildes to absolute paths before writing to or reading from the mount registry.
This commit is contained in:
@@ -52,6 +52,15 @@ runs:
|
||||
echo "S3 bucket: s3://${S3_BUCKET}"
|
||||
echo ""
|
||||
|
||||
# Normalize target path (expand tilde and resolve to absolute path)
|
||||
# This ensures consistent path comparison with the mount registry
|
||||
if [[ "${TARGET_PATH}" == ~* ]]; then
|
||||
# Expand tilde manually (works even if directory doesn't exist yet)
|
||||
TARGET_PATH="${HOME}${TARGET_PATH:1}"
|
||||
fi
|
||||
echo "Normalized target path: ${TARGET_PATH}"
|
||||
echo ""
|
||||
|
||||
# Find the cache workspace from mount registry
|
||||
MOUNT_REGISTRY="/tmp/xahau-cache-mounts.txt"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user