Skip to content

Output from post install script is not printed #1675

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

Closed
per1234 opened this issue Feb 24, 2022 · 0 comments · Fixed by #2090
Closed

Output from post install script is not printed #1675

per1234 opened this issue Feb 24, 2022 · 0 comments · Fixed by #2090
Assignees
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 24, 2022

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.

Related

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 24, 2022
@umbynos umbynos assigned cmaglie and unassigned umbynos Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants