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

Broken state after aborting an install command #225

Closed
jakst opened this issue Oct 2, 2023 · 12 comments
Closed

Broken state after aborting an install command #225

jakst opened this issue Oct 2, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@jakst
Copy link

jakst commented Oct 2, 2023

What version?

0.19.1

Which command?

proto install

What happened?

I ran proto install pnpm 8.8.0, and then aborted the command half way through. After that the same command would get stuck in an endless installation whenever I ran it. The only thing that resolved the issue was blowing away the ~/.proto folder and reinstalling proto.

After reinstalling proto I intentionally tried to break proto again with proto install bun 1.0.3 and aborting, and managed to break it in the same way. So this seems reproducible with multiple tools.

Any logs?

No response

Operating system?

MacOS

Architecture?

Arm64

@jakst jakst added the bug Something isn't working label Oct 2, 2023
@milesj
Copy link
Contributor

milesj commented Oct 2, 2023

I'm not really sure what the fix would be here? Maybe a --force option for install?

The problem I'm guessing is that the directory is locked, because it was never unlocked.

@jakst
Copy link
Author

jakst commented Oct 3, 2023

Can you detect the lock on the subsequent install and prompt for a force? It might be hard for many users to realize they need to use the --force flag otherwise.

@milesj
Copy link
Contributor

milesj commented Oct 3, 2023

The waiting/hanging is because of the lock. If the lock exists, the program waits until the lock is removed.

Let me think about this a bit more. Maybes theres some kind of cleanup I can trigger when receiving a signal.

@jakst
Copy link
Author

jakst commented Oct 4, 2023

Is it possible to install to a temporary location, and then switch in the new binary as a last step? This would reduce the time you need to have a lock enabled

@milesj
Copy link
Contributor

milesj commented Oct 4, 2023

Trying this #226

@milesj
Copy link
Contributor

milesj commented Oct 5, 2023

Ok I think 0.19.2 should handle this

@milesj milesj closed this as completed Oct 9, 2023
@jakst
Copy link
Author

jakst commented Oct 11, 2023

@milesj I think the new method has some problems. I keep getting this error message

image

Here's a link to the logs: https://pastebin.com/ryuaBZfS

@milesj
Copy link
Contributor

milesj commented Oct 11, 2023

@jakst When this happens, have you checked what's at ~/.proto/tools/pnpm/8.9.0?

@milesj milesj reopened this Oct 11, 2023
@jakst
Copy link
Author

jakst commented Oct 11, 2023

Haven't checked the actual contents, but I tried clearing the folder and rerunning, without success. I can check

@milesj
Copy link
Contributor

milesj commented Oct 11, 2023

Yeah I'm curious what's actually there that's blocking it.

This isn't running in parallel with another process yeah?

@milesj
Copy link
Contributor

milesj commented Oct 11, 2023

Just going to delete it if it does exist: #230

@jakst
Copy link
Author

jakst commented Oct 12, 2023

Yeah I'm curious what's actually there that's blocking it.

This isn't running in parallel with another process yeah?

Sorry, I was doing other things and forgot to check, but now I by habit bumped to the fixed version before I had a chance to test it 😅

No parallell proto process was running.

@milesj milesj closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants