mirror of
https://github.com/actions/cache.git
synced 2026-11-20 09:02:54 +00:00
This change modifies getInputAsArray to support both YAML list format (which GitHub Actions converts to JSON arrays) and the existing newline-separated string format. When the input starts with '[', it attempts to parse as JSON array. If successful and the result is an array, it processes those items. Otherwise, it falls back to the existing newline-separated behavior. This enables users to write: ```yaml path: - ~/cache - **/node_modules # inline comments work! ``` Instead of being limited to: ```yaml path: | ~/cache **/node_modules ``` Fixes #510