Description
Describe the bug
Arduino boards platform authors may add a "post-install script" to their platform. Arduino CLI and Arduino IDE run this script at the end of the platform installation process.
🐛 Output from the script is not printed. This output might provide instructions to the user or information useful for troubleshooting an error during the script execution.
To Reproduce
$ arduino-cli version
arduino-cli Version: nightly-20220224 Commit: 2f2cbe2 Date: 2022-02-24T01:31:21Z
$ arduino-cli core uninstall arduino:mbed_nano
Uninstalling arduino:[email protected]...
Platform arduino:[email protected] uninstalled
$ arduino-cli core install arduino:[email protected]
Tool arduino:[email protected] already installed
Tool arduino:arm-none-eabi-gcc@7-2017q4 already installed
Tool arduino:[email protected] already installed
Tool arduino:[email protected] already installed
Tool arduino:[email protected] already installed
Downloading packages...
arduino:[email protected] already downloaded
Installing platform arduino:[email protected]...
Configuring platform....
Platform arduino:[email protected] installed
The process was not run as root, so it was necessary for the script to exit without configuring the udev rules as intended:
https://github.com/arduino/ArduinoCore-mbed/blob/2.7.2/post_install.sh#L12-L15
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
🐛 The Arduino CLI output does not include the script output:
Please run as root
Expected behavior
Arduino CLI prints any output from the post-install script, as is done by Arduino IDE 1.x.
Desktop
- OS: Ubuntu 20.04
- nightly-20220224 Commit: 2f2cbe2 Date: 2022-02-24T01:31:21Z
Additional context
I realize that it is very questionable whether the output from the particular script used by the demo is of any value. But that only indicates a defect in the implementation of this specific script, not that script output is fundamentally worthless.