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

Absolute path to symbolic link crashes the app (at least on OSX) #114

Closed
leomelin opened this issue Apr 14, 2015 · 1 comment

Comments

@leomelin
Copy link

commented Apr 14, 2015

Noticed that newer version than 3.3.0 (problem doesn't occur there) crash (at least on OSX) if standard is pointing to a file with absolute path, e.g. let's say

standard /var/www/fooBar/foo.js

The crash message:

standard: Unexpected linter output:

Error: ENOENT, no such file or directory '/private/var/www/fooBar/var/www/fooBar/foo.js'
    at Error (native)
    at Object.fs.statSync (fs.js:721:18)
    at walk (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/util/traverse.js:36:15)
    at /usr/local/lib/node_modules/standard/node_modules/eslint/lib/util/traverse.js:102:9
    at Array.forEach (native)
    at traverse (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/util/traverse.js:101:11)
    at CLIEngine.executeOnFiles (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/cli-engine.js:284:9)
    at /usr/local/lib/node_modules/standard/index.js:111:52
    at zalgoSafe (/usr/local/lib/node_modules/standard/node_modules/dezalgo/dezalgo.js:20:10)
    at done (/usr/local/lib/node_modules/standard/node_modules/run-parallel/index.js:18:15)

If you think this is a bug in `standard`, open an issue: https://github.com/feross/standard

It seems to duplicate the path when /var -directory is a symbolic link, like it usually is on OSX pointing to /private/var

@feross

This comment has been minimized.

Copy link
Member

commented Apr 15, 2015

Thanks for reporting. Looks like we just needed to do a path.resolve instead of path.join
here: 3bbb5aa

Released as 3.6.1.

@feross feross closed this in fefffe9 Apr 15, 2015

Flet added a commit to Flet/standard that referenced this issue Oct 23, 2015

Fix crash on absolute filesystem path
Looks like we just needed to do a `path.resolve` instead of `path.join`
here:
standard@3bbb5aa
ac43df8ab1

Fixes standard#114. cc @Flet

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.