brandedoutcast / publish-nuget

📦 GitHub action to automate publishing NuGet packages when project version changes
https://github.com/marketplace/actions/publish-nuget
MIT License
197 stars 101 forks source link

[Bug] fail publishing nuget when there is a nupkg folder #31

Closed tekix closed 4 years ago

tekix commented 4 years ago

When there is a nupkg folder, the following error occurs.

Error: EISDIR: illegal operation on a directory, unlink 'nupkg'
    at Object.unlinkSync (fs.js:1035:3)
    at /home/runner/work/_actions/brandedoutcast/publish-nuget/v2.5.0/index.js:58:81
    at Array.forEach (<anonymous>)
    at Action._pushPackage (/home/runner/work/_actions/brandedoutcast/publish-nuget/v2.5.0/index.js:58:64)
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/brandedoutcast/publish-nuget/v2.5.0/index.js:109:30)
    at IncomingMessage.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1184:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -21,
  syscall: 'unlink',
  code: 'EISDIR',
  path: 'nupkg'

Error occurs at: https://github.com/brandedoutcast/publish-nuget/blob/master/index.js#L58

Maybe to skip deleting the folders, or delete the folders by other operation?