Skip to content

data directory configuration option does not work with relative path #2019

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

Open
3 tasks done
aarobc opened this issue Dec 29, 2022 · 1 comment
Open
3 tasks done

data directory configuration option does not work with relative path #2019

aarobc opened this issue Dec 29, 2022 · 1 comment
Assignees
Labels
type: imperfection Perceived defect in any part of project

Comments

@aarobc
Copy link

aarobc commented Dec 29, 2022

Describe the problem

When setting the directories.data option in the arduino-cli.yaml with a relative path, The dependency is downloaded correctly, but an error "no such file or directory" is given upon build.

To reproduce

create a new project with a dependency, and an arduino-cli.yaml in the root with the following contents:

 directories:                                                                                  
   data: ./data                                                                                
   downloads: ./staging 

An example repo is available here: https://github.com/aarobc/arduino-cli-error-example
clone down the repo and run:

arduino-cli compile --profile uno

The build fails, and following error will be given:

Error during build: stat data/internal/Encoder_1.4.2_496972fffc26d938/Encoder/data/internal/Encoder_1.4.2_496972fffc26d938/Encoder/Encoder.cpp: no such file or directory

Expected behavior

No error to be given, and build to be successful.

Arduino CLI version

nightly-20221229 Commit: 357d465 Date: 2022-12-29T01:33:09Z

Operating system

Linux

Operating system version

Arch rolling (6.1.1-arch1-1)

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@cmaglie
Copy link
Member

cmaglie commented Jun 9, 2023

@aarobc
We removed the support for arduino-cli.yaml configuration in the current working directory, because of supposed security risks #2085

In any case, why are you writing the arduino-cli.yaml in the sketch?
Shouldn't the sketch.yaml be already sufficient? The CLI is able to install the missing pieces automatically (without interfering with the globally installed tools).

@cmaglie cmaglie self-assigned this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants