Skip to content

[Bug]: ios dependencies with .swift in name causing 'EISDIR: illegal operation on a directory, read' #7582

@rainbow-six3

Description

@rainbow-six3

Capacitor Version

6.1.1

Other API Details

No response

Platforms Affected

  • iOS

Current Behavior

I am using the SQLite.swift in a custom capacitor plugin. When you run npx cap sync ios you got following error:
`
✖ copy ios - failed!
[error] Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:744:3)
at tryReadSync (node:fs:444:20)
at readFileSync (node:fs:490:19)
at findPluginClasses
(/node_modules/@capacitor/cli/dist/util/iosplugin.js:37:54)
at generateIOSPackageJSON
(/node_modules/@capacitor/cli/dist/util/iosplugin.js:61:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /node_modules/@capacitor/cli/dist/tasks/copy.js:86:13
at async runTask (/node_modules/@capacitor/cli/dist/common.js:165:23)
at async copy (/node_modules/@capacitor/cli/dist/tasks/copy.js:44:5)
at async sync (/node_modules/@capacitor/cli/dist/tasks/sync.js:51:9)

`

Expected Behavior

The sync command should not try to read directories named with ".swift" at the end as file.

Project Reproduction

https://github.com/rainbow-six3/example-capcaitor-ios-dependencies-with-swift-in-name

Additional Information

PR with fix: #7583

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions