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

Linux build: remove symlinks only if they exist #8781

Merged
merged 1 commit into from Apr 15, 2019

Conversation

@MrMebelMan
Copy link
Contributor

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 label Apr 12, 2019
@MrMebelMan

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2019

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

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

@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

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

Thanks 🙏

@MrMebelMan MrMebelMan deleted the MrMebelMan:fix_linux_build_symlink_error branch Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.