Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent error: directory is not empty #483

Open
lionello opened this issue Dec 5, 2024 · 3 comments
Open

Intermittent error: directory is not empty #483

lionello opened this issue Dec 5, 2024 · 3 comments

Comments

@lionello
Copy link

lionello commented Dec 5, 2024

This happens once in a while:

Run goreleaser/goreleaser-action@v6
  with:
    distribution: goreleaser-pro
    args: release --split  
    workdir: src
    version: ~> v2
    install-only: false
  env:
    GOPATH: D:\golang\go
    GOCACHE: D:\golang\cache
    GOMODCACHE: D:\golang\modcache
    GGOOS: windows
    GORELEASER_KEY: ***
Downloading https://github.com/goreleaser/goreleaser-pro/releases/download/v2.4.8-pro/goreleaser-pro_Windows_x86_64.zip
Extracting GoReleaser
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ; try { [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\55b65de3-305b-46fe-978c-aaf3e153122a.zip', 'D:\a\_temp\dc4f777d-1952-4b50-8e0f-a8bdd8454fa8', $true) } catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath 'D:\a\_temp\55b65de3-305b-46fe-978c-aaf3e153122a.zip' -DestinationPath 'D:\a\_temp\dc4f777d-1952-4b50-8e0f-a8bdd8454fa8' -Force } else { throw $_ } } ;"
Error: Command failed: C:\Windows\system32\cmd.exe /s /c "rd /s /q "%inputPath%""
The directory is not empty.

The action succeeded when rerun.

@caarlos0
Copy link
Member

weird... never seen this error before 🤔

@lionello
Copy link
Author

Only on Windows, I guess. You can check the failed run here: https://github.com/DefangLabs/defang/actions/runs/12179896929/job/33973093520

@caarlos0
Copy link
Member

isn't it because you're downloading it two times?

i think that if you use install-only: true then you can call goreleaser in 2 subsequent calls and it should work...

i use the action with windows all the time and never seen this error...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants