runner icon indicating copy to clipboard operation
runner copied to clipboard

hashFiles does not follow docs

Open y-nk opened this issue 1 year ago • 0 comments

Describe the bug As per the docs:

image

internal code of @actions/glob mentions that patterns can be splitted by \n

https://github.com/actions/toolkit/blob/6dd369c0e648ed58d0ead326cf2426906ea86401/packages/glob/src/glob.ts#L11

To Reproduce

on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - run: touch file.ts file.tsx
      - run: echo ${{ hashFiles('file.ts\nfile.tsx') }} # empty output
      - run: echo ${{ hashFiles('file.ts', 'file.tsx') }} # correct hash

Expected behavior it should be possible to pass a string with \n delimiters (or even better an array) so that we can feed a fromJson() or a join(fromJson()) expression

y-nk avatar Sep 18 '24 08:09 y-nk