action-zip icon indicating copy to clipboard operation
action-zip copied to clipboard

Recursive directions are self-contradictory

Open dmrickey opened this issue 2 years ago • 0 comments

If for example, you do the following:

- uses: vimtor/action-zip@v1
  with:
    files: dist/ manifest.json
    recursive: false
    dest: result.zip

All the files inside the dist folder will be added at the root of the zip along with manifest.json. By contrast, if recursive: true (by default), the folder dist is included.

Also if you want a nested file at the root, recursive: false is your guy.

Right after the example it says All the files inside the dist folder will be added at the root of the zip along with manifest.json. if recursive: false is specified. This is the behavior I observed when I did not specify recursive at all. The following says by default, the dist folder will be included.

The behavior I observed without specifying recursive was that all of the folders had their contents dumped into the root of the archive. I had to specifically declare recursive: false for the folders to be included as is.

Specifically the line directly after the example seems opposite of the line at the end.

dmrickey avatar Jul 18 '23 19:07 dmrickey