- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 432
Closed
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Bug Report
Empty folders under <directories.user>/libraries show up as is_legacy: true libraries. If the folder is empty (or contains non-sketch/library files), maybe it should be ignored.
Current behavior
Steps to reproduce:
% rm -rf ~/Documents/Arduino && rm -rf ~/Library/Arduino15
% ./arduino-cli version --format json                     
{
  "Application": "arduino-cli",
  "VersionString": "0.22.0",
  "Commit": "65f662a7",
  "Status": "",
  "Date": "2022-05-06T11:09:35Z"
}
% ./arduino-cli lib list --format json                    
[]
% mkdir -p ~/Documents/Arduino/libraries/nothing_here     
% ./arduino-cli lib list --format json               
[
  {
    "library": {
      "name": "nothing_here",
      "architectures": [
        "*"
      ],
      "install_dir": "/Users/a.kitta/Documents/Arduino/libraries/nothing_here",
      "source_dir": "/Users/a.kitta/Documents/Arduino/libraries/nothing_here",
      "is_legacy": true,
      "location": 1
    }
  }
]
%
Expected behavior
The empty folder is ignored by the lib list command:
% rm -rf ~/Documents/Arduino && rm -rf ~/Library/Arduino15
% ./arduino-cli version --format json                     
{
  "Application": "arduino-cli",
  "VersionString": "0.22.0",
  "Commit": "65f662a7",
  "Status": "",
  "Date": "2022-05-06T11:09:35Z"
}
% ./arduino-cli lib list --format json                    
[]
% mkdir -p ~/Documents/Arduino/libraries/nothing_here     
% ./arduino-cli lib list --format json               
[]
%
Environment
- CLI version (output of arduino-cli version):arduino-cli Version: 0.22.0 Commit: 65f662a7 Date: 2022-05-06T11:09:35Z
- OS and platform: macOS 12.3.1 (21E258)
Additional context
umbynos
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project