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

Fix an improperly handled FileNotFound error on initial self-install #43

Closed
wants to merge 1 commit into from

Conversation

CompeyDev
Copy link
Contributor

On the first Rokit run with self-install, it tries to create the .rokit directory in the user's home, using create_dir_all (which creates the tool storage directories and their parent, .rokit).

The underlying issue was that Rokit first tried to load or create the manifest files, which fail, since the parent directory does not exist.

This has been fixed by reordering try_join! call - we now create the directories first, and then the manifests, and since the directory creations are operations blocking with await; try_join! runs tasks concurrently, essentially waiting for the directory creations to finish first.

On the first Rokit run with self-install, it tries to create the `.rokit`
directory in the user's home, using `create_dir_all` (which creates the
tool storage directories and their parent, `.rokit`).

The underlying issue was that Rokit first tried to load or create the
manifest files, which fail, since the parent directory does not exist.

This has been fixed by reordering `try_join!` call - we now create the
directories first, and then the manifests, and since the directory creations
are operations blocking with `await`; `try_join!` runs tasks concurrently,
essentially waiting for the directory creations to finish first.
@CompeyDev
Copy link
Contributor Author

Upon reconsideration, this isn't a proper solution, #42 is instead.

@CompeyDev CompeyDev closed this Jul 15, 2024
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

Successfully merging this pull request may close these issues.

1 participant