Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Engine.from_cli fails if there is a directory present in the .cache/dagger folder #57

Closed
tomasol opened this issue Apr 24, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@tomasol
Copy link

tomasol commented Apr 24, 2023

I have the following in my .cache/dagger:

tree ~/.cache/dagger/
~/.cache/dagger/
├── dagger-0.4.2
├── dagger-0.5.0
└── oci
    └── ingest

Running the examples fails on

Error: Is a directory (os error 21)

Removing the section that calls std::fs::remove_file fixes the problem. Not sure why deleting the other files would be necessary.

@kjuulh
Copy link
Owner

kjuulh commented Apr 25, 2023

Hi @tomasol.

I believe it is a remanant for when I did the initial implementation. That if the version is upgraded the it refreshes the entire directly. This really isn't necessary!

It would've worked fine if it deleted it properly (though far too wasteful and disruptive for other clients). I've actually written this as a bullet point in the readme.

Run in conjunction with golang and other sdks

This was actually this issue I was referring too.

@kjuulh kjuulh added the bug Something isn't working label Apr 25, 2023
@kjuulh
Copy link
Owner

kjuulh commented Apr 25, 2023

@kjuulh kjuulh closed this as completed Apr 25, 2023
@tomasol
Copy link
Author

tomasol commented Apr 25, 2023

Awesome, thanks for the quick fix!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants