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 creating record file when not required #74

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

wmartinmimi
Copy link
Contributor

Fixes: #72

Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR!

for _, bin in pairs(M.bins_to_fetch()) do
record:write(bin.url .. '\n')
if config.opts.dependencies_bin[bin.name] ~= nil then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this mark record_required as false when one of the dependencies_bin doesn't need to be downloaded but the other one does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah true, my bad

if record == nil then
error("Can't open record file!: " .. err)
end
for _, bin in pairs(M.bins_to_fetch()) do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's best to only write the bin that are not in dependencies_bin into record file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that would be better

Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it still creates version_record.txt but it doesn't error since the parent directories will be created

@chomosuke chomosuke merged commit 4e5e956 into chomosuke:master Nov 25, 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.

[BUG] can't open record file when both tinymist and websocat binary is provided
2 participants