Skip to content
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

[Bug] cssDir parameter fails to accept valid file inputs #2

Open
yoktav opened this issue Oct 3, 2024 · 0 comments
Open

[Bug] cssDir parameter fails to accept valid file inputs #2

yoktav opened this issue Oct 3, 2024 · 0 comments

Comments

@yoktav
Copy link
Owner

yoktav commented Oct 3, 2024

Description:

The cssDir parameter, which is intended to specify the directory where CSS files are located, throws an error when a specific file is passed instead of a directory. The error occurs during the scan for unused CSS classes from Twig files.

Steps to Reproduce:

  1. Set the cssDir parameter to point to a specific file (e.g., ./path/to/css/file/main.css).
  2. Run the script to find unused CSS classes from Twig files.
  3. Observe the error:
Error: ENOTDIR: not a directory, scandir './path/to/css/file/main.css'

Expected Behavior:
The cssDir parameter should allow passing a file path or handle file-specific scenarios gracefully, without causing an error.

Actual Behavior:
The script throws an ENOTDIR error when a file is passed to the cssDir parameter, expecting a directory instead.

Environment:

  • Version: v1.0.0
  • OS: macOS
  • Node.js: v18.3.0

Error:

Error: ENOTDIR: not a directory, scandir './path/to/css/file/main.css'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant