arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

core install does not seem to persist installed core even with --no-overwrite

Open paulz opened this issue 2 years ago • 3 comments
trafficstars

Describe the problem

Running core install does not seem to persist installed core:

arduino-cli core install esp32:esp32 --no-overwrite --run-post-install --verbose

To reproduce

We can only reproduce it on GitHub actions self-hosted runner.

  1. setup self-hosted runner
  2. add workflow with this step
    - name: install platform core
      run: arduino-cli core install esp32:esp32 --no-overwrite --run-post-install --verbose
  1. run workflow multiple times

Expected behavior

Platform esp32:[email protected] already installed

Arduino CLI version

arduino-cli Version: 0.31.0 Commit: 940c9457 Date: 2023-02-20T15:09:19Z

Operating system

macOS

Operating system version

12.6.3 (21G419)

Additional context

running from the command line in zsh this command works as expected:

% arduino-cli core install esp32:esp32          
Platform esp32:[email protected] already installed

Issue checklist

  • [X] I searched for previous reports in the issue tracker
  • [X] I verified the problem still occurs when using the nightly build
  • [X] My report contains all necessary details

paulz avatar Mar 27 '23 06:03 paulz

this cause CI job to install core every time, which is slow:

https://github.com/paulz/arduino-sketches/actions/runs/4529292169/jobs/7976884691#step:4:5

paulz avatar Mar 27 '23 06:03 paulz

could this be caused by https://github.com/arduino/arduino-cli/issues/2019

when relative path is not working seems libraries are installed in the current subdirectory with name ~

paulz avatar Mar 27 '23 06:03 paulz

as a workaround we had to change arduino-cli.yaml to use absolute directories:

directories:
  data: /Users/MY_USER_NAME/Library/Arduino15
  downloads: /Users/MY_USER_NAME/Library/Arduino15/staging
  user: /Users/MY_USER_NAME/Library/Arduino15/user

where MY_USER_NAME is current user name (see output from echo $USER)

paulz avatar Mar 27 '23 07:03 paulz