dsaltares / fetch-gh-release-asset

Github Action to download an asset from a Github release
MIT License
113 stars 70 forks source link

Download to target fails with `illegal operation on a directory, open '.dir/` #58

Open victoryNap opened 1 year ago

victoryNap commented 1 year ago

Given the following configuration:

        name: Download release asset
        uses: dsaltares/fetch-gh-release-asset@master
        with:
          repo: '***'
          version: 'tags/${{ fromJson(steps.get_version.outputs.compiler_version).version }}'
          file: 'test.jar'
          token: ${{ secrets.GHCR_TOKEN }}
          target: '.dir/'

The following is returned as an error:

Run dsaltares/fetch-gh-release-asset@master
  with:
    repo: ***
    version: tags/***
    file: test.jar
    token: ***
    target: .dir/
    regex: false
node:internal/process/promises:27[9](***)
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: EISDIR: illegal operation on a directory, open '.dir/'] {
  errno: -21,
  code: 'EISDIR',
  syscall: 'open',
  path: '.dir/'
}

I know that .dir is available, for the time being, I'm downloading to the workspace root, and moving the jar, but this seems like a bug.

zischknall commented 1 year ago

got the same error:

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: EISDIR: illegal operation on a directory, open 'projects/ci'] {
  errno: -21,
  code: 'EISDIR',
  syscall: 'open',
  path: 'projects/ci'
}
dsaltares commented 5 months ago

Can you provide a repro case I can access to test?

Architrixs commented 4 months ago

Any solution or workaround?

zischknall commented 4 months ago

Hey folks,

I can't really remember this issue. But I just double checked and it seems I resorted to not use the path input to prevent the issue from happening.