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

experimental: clean multishells on shell exit #865

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Schniz
Copy link
Owner

@Schniz Schniz commented Nov 19, 2022

This PR adds --delete-on-exit (name TBD) to allow to remove the symlinks from the multishells directory.
This was not a concern for me but I see many users that complain about it. It does introduce some complexity that I am not sure about tbh.

Fixes #696

this commit introduces this feature for Bash, let's see how to support other shells
@Schniz Schniz self-assigned this Nov 19, 2022
@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2022

⚠️ No Changeset found

Latest commit: 82ec6c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Schniz
Copy link
Owner Author

Schniz commented Nov 19, 2022

the main issue with this solution is that it will only work if the shell was closed cleanly. I believe this won't be the case most of the time.

Maybe another way we can do it is by outputting the PID as a part of the multishell, in the fnm env, making it more dynamic. Unfortunately that will make --json fail :thinkies:

another option is to make the setup be something like fnm env --pid=$$ if you want to be able to delete it.

bah

no good option :sad-t-rex:

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.

Support cleaning the cache directory
1 participant