Skip to content

Compile fails on symlink #1765

Closed
Closed
@econeale

Description

@econeale

Describe the problem

When executing arduino-cli compile within a project that is also a git repository, I receive this error:

/Users/neale/myProject/.git/hooks/pre-commit: no such file or directory

This pre-commit hook is a symlink to a shell script that's also contained in the repository. This appears to happen regardless of where the symlink points / exists in the repository. There appears to be no way to work around the error other than completely removing the link.

To reproduce

Create a project with the structure:

  • myProject
    • myProject.ino
    • aLink -> /somewhere/else

Execute arduino-cli compile within the directory.

Expected behavior

Several solutions to this come to mind:

  1. Recursing hidden directories probably shouldn't happen by default
  2. Ability to explicitly list files / directories to compile
  3. An option to follow / not follow symlinks

Arduino CLI version

0.23.0

Operating system

macOS

Operating system version

12.3.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

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions