toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

docs(glob): Fix glob.create call in README example.

Open TWiStErRob opened this issue 2 years ago • 0 comments

Copy-pasting official docs into my code and getting this blob of text is not ideal:

TypeError: globber.globGenerator(...) is not a function or its return value is not async iterable
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:8:34)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
    at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:26)
Error: Unhandled error: TypeError: globber.globGenerator(...) is not a function or its return value is not async iterable
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35556:12)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)

It took me a while to figure out what's wrong, raising the PR to reduce the investigation for the next non-JavaScript expert coming along.

TWiStErRob avatar Feb 25 '24 21:02 TWiStErRob