Skip to content

Linux build: remove symlinks only if they exist #8781

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

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

MrMebelMan
Copy link
Contributor

@MrMebelMan MrMebelMan commented Apr 12, 2019

The message "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo." appears even when there's no symlink (for example, when installing for the first time). I don't think that a user should be adviced to run it as root in this case.

  • check if symlink exists before trying to remove it

@per1234 per1234 added the OS: Linux Specific to the Linux version of the Arduino IDE label Apr 12, 2019
@MrMebelMan
Copy link
Contributor Author

Since the user will probably still need superuser privilages later, maybe it's also a good idea to use

ln -s foo bar || sudo ln -s foo bar

instead of just ln -s foo bar when creating a symlink?

So it will ask the user for sudo password only if needed.

@facchinm
Copy link
Member

@MrMebelMan thanks for the PR! I'm merging it right now; about the second part, it would complicate the script a bit but could be a good idea for systems lacking sudo (not a very wide problem probably 😉 )

@facchinm facchinm merged commit ad69480 into arduino:master Apr 15, 2019
@MrMebelMan
Copy link
Contributor Author

Thanks 🙏

@MrMebelMan MrMebelMan deleted the fix_linux_build_symlink_error branch April 15, 2019 19:33
@luisfigo27
Copy link

I had this error, how to delete the file?
image

image

@arduino arduino locked as resolved and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
OS: Linux Specific to the Linux version of the Arduino IDE Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants