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

Error: EISDIR: illegal operation on a directory #555

Closed
Lngramos opened this issue Feb 29, 2016 · 6 comments · Fixed by #719
Closed

Error: EISDIR: illegal operation on a directory #555

Lngramos opened this issue Feb 29, 2016 · 6 comments · Fixed by #719
Assignees
Labels
Milestone

Comments

@Lngramos
Copy link

Running sass-lint . fails on my system, throwing the following error:

fs.js:603
  var r = binding.read(fd, buffer, offset, length, position);
                  ^

Error: EISDIR: illegal operation on a directory, read
    at Error (native)
    at Object.fs.readSync (fs.js:603:19)
    at Object.fs.readFileSync (fs.js:438:24)
    at /Users/myuser/projects/my-project/node_modules/sass-lint/index.js:180:18
    at Array.forEach (native)
    at Function.sassLint.lintFiles (/Users/myuser/projects/my-project/node_modules/sass-lint/index.js:178:9)
    at detectPattern (/Users/myuser/projects/my-project/node_modules/sass-lint/bin/sass-lint.js:16:18)
    at /Users/myuser/projects/my-project/node_modules/sass-lint/bin/sass-lint.js:91:5
    at Array.forEach (native)
    at Object.<anonymous> (/Users/myuser/projects/my-project/node_modules/sass-lint/bin/sass-lint.js:90:16)

I'm running Node v4.2.4 and the latest version of sass-lint (v1.5.1) on OS X 10.11 and fails with and without default config files.

@DanPurdy
Copy link
Member

How're you running sass-lint? From the CLI? If so which command did you use?

@Lngramos
Copy link
Author

Yeah, from the CLI, simply by running sass-lint . as mentioned above.

I've also attempted running it via an npm script using the same command.

@nene
Copy link

nene commented Mar 7, 2016

I ran into the same thing.

Coming from scss-lint I assumed that sass-lint would scan a directory for .sass & .scss files. But apparently it doesn't - it just blindly attempts to read the directory as a file.

Workaround: sass-lint 'path/to/**/*.scss'

@DanPurdy
Copy link
Member

DanPurdy commented Mar 7, 2016

Maybe we weren't so specific but it does mention the globbing and including of a file extension in the docs for the CLI and config file include section.

This probably should change though. Thanks 👍

@mischkl
Copy link

mischkl commented May 2, 2016

It would be nice if running sass-lint from the command line would auto-detect a sass-lint.yml file in the same directory. Also it might be nice to at least get feedback about the number of warnings, even when not in verbose mode. Otherwise it looks like nothing happened. :)

@DanPurdy DanPurdy self-assigned this May 6, 2016
@DanPurdy DanPurdy added the bug label May 17, 2016
@DanPurdy DanPurdy added this to the 1.8.0 milestone May 17, 2016
@DanPurdy
Copy link
Member

I found the cause of this, if running sass-lint without any options the default glob would match folders labelled like the following 'o.scss' which happens the appear in the sass-graph package which is a dependency of node-sass. If you dont pass options to sass-lint the chances are it attempted to lint your node modules and came across this.

The fix should be with you for 1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants