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

Display useful message when Linux post-install script has insufficient permissions #893

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Display useful message when Linux post-install script has insufficient permissions #893

merged 1 commit into from
Jun 10, 2024

Commits on Jun 10, 2024

  1. Display useful message when Linux post-install script has insufficien…

    …t permissions
    
    The Arduino Boards Manager automatically executes the `post_install.sh` script during installation of the platform on a
    Linux machine.
    
    This platform's post-install script is intended to create a udev rules file that gives write permissions for the USB
    devices of the platform's boards. These permissions are required in order to upload to the boards.
    
    The creation of the udev rules file requires superuser privileges, which are typically not available in the context of
    the post-install script's execution. The script contains code to check whether the necessary privileges are available.
    If not, it prints a message and skips the udev rules file creation.
    
    Previously the message printed when the udev rules file creation was not possible was "Please run as root". This message
    was completely meaningless to the user when printed during the Boards Manager installation. Worse, it might cause them
    to think they must run the Arduino development software as root user, which is a bad idea and also wouldn't result in
    the udev rules file being created since the installation of the platform to the user's account was already completed.
    
    The message is hereby updated to provide a meaningful explanation of the potential problem as well as the specific
    command the user can run from the terminal to execute the script as superuser.
    per1234 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    daea2f1 View commit details
    Browse the repository at this point in the history