Skip to content

only-include-used-icons may look into the wrong folder #234

@sneko

Description

@sneko

Hi @garronej ,

I'm working on a project that fetches multiple repositories in a subfolder, and this folder is .gitignore since it's only for analyses.

Unfortunately the binary only-include-used-icons throws an error trying to find dsfr assets into them:

[Error: ENOENT: no such file or directory, realpath '/xxx/myproject/data/initiatives/ac3a1957-2f3c-4aec-8b61-61d45ab9655f/repositories/a7510318-ebab-4559-b3b9-767277bac8a2/public/dsfr/fonts'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'realpath',
  path: '/xxx/myproject/data/initiatives/ac3a1957-2f3c-4aec-8b61-61d45ab9655f/repositories/a7510318-ebab-4559-b3b9-767277bac8a2/public/dsfr/fonts'
}

I tried to have a look at https://github.com/codegouvfr/react-dsfr/blob/main/src/bin/only-include-used-icons.ts but I don't get which instructions would try to go into nested folders (cwd and getProjectRoot seem to not do that).

If you have any idea, I would appreciate!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions