checkout-files icon indicating copy to clipboard operation
checkout-files copied to clipboard

Invalid Arg Type error

Open h-Nystrom opened this issue 3 years ago • 3 comments

Hi, I've tried this action on two of my repositories. My new test repository is working flawless, but I keep getting this error message on my older repo do you know what the issue could be?

Run h-nystrom/checkout-files@v2 with: files: Plugins token: ***

node:internal/errors:464 ErrorCaptureStackTrace(err); ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined at new NodeError (node:internal/errors:371:5) at Function.from (node:buffer:322:9) at saveContent (/home/runner/work/_actions/h-nystrom/checkout-files/v2/index.js:34:32) at /home/runner/work/_actions/h-nystrom/checkout-files/v2/index.js:28:13 at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 'ERR_INVALID_ARG_TYPE'

h-Nystrom avatar Jul 28 '22 08:07 h-Nystrom

Hi, thanks for the report.

Looking at the error, checkout-files/v2/index.js:34:32, it seems that data.content is empty.

  • Is Plugins a folder and/or empty folder?
  • Is Plugins an empty file, if a folder, does it content an empty file?

Bhacaz avatar Aug 01 '22 13:08 Bhacaz

Ok, interesting. The folder structure is (both repos share the same hierarchy): ./Plugins/PluginA/File1.h ./Plugins/PluginB/File2.h ... I basically want to checkout all files in that folder. Could the issue be that it doesn't find the folder in the root of my old repo?

Thanks for the help! :)

h-Nystrom avatar Aug 01 '22 13:08 h-Nystrom

It doesn't appear to support subfolders :(

pl4nty avatar Apr 25 '23 10:04 pl4nty