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

If ~/.local/bin folder doesn't exist use fails to setup symbolic links #28

Open
adam-fowler opened this issue Mar 5, 2023 · 2 comments

Comments

@adam-fowler
Copy link
Member

There are too many places in the code base at the moment where errors are not caught and dealt with. The use function would throw an error and then that was it. We should catch this and create the folder.

@patrickfreed
Copy link
Collaborator

patrickfreed commented Mar 20, 2023

SWIFTLY_BIN_DIR, SWIFTLY_HOME_DIR, and SWIFTLY_HOME_DIR/toolchains are all created by each command before it runs if they don't exist, see here: https://github.com/patrickfreed/swiftly/blob/main/Sources/Swiftly/Swiftly.swift#L47. Can you share the error you were seeing / steps to reproduce it?

@adam-fowler
Copy link
Member Author

I cannot remember anymore how I got this. It is kinda moot when running from the script as it sticks swiftly inside the ~/.local/bin folder. So the folder will always exist. But I do think we should be catching unexpected errors and trying to provided a readable error message from them.

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

No branches or pull requests

2 participants