Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cache-hit undefined on cache miss? #1334

@aryairani

Description

@aryairani

The README says:

Note cache-hit will only be set to true when a cache hit occurs for the exact key match. For a partial key match via restore-keys or a cache miss, it will be set to false.

but outputs.cache-hit == 'false' doesn't seem to be true when I get a cache miss, and I noticed that the examples all use != 'true', not == 'false'.

I think here we can see restoreImpl return early on a miss, without setting any value for cache-hit at all. I'm not a TypeScript or Actions expert though.

In the meantime, I'll switch my == 'false' to != 'true' but I feel dirty. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions