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

standard v14 not working with files in a different directory #1384

Open
revington opened this issue Aug 21, 2019 · 1 comment

Comments

@revington
Copy link

commented Aug 21, 2019

What version of this package are you using?
14.0.0
What operating system, Node.js, and npm version?
Void Linux, node 10.16.3, npm 6.9.0
What happened?
$ standard --fix $file-not-same-directory fails with

/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:337
  throw new Ctor(message)
  ^

RangeError: path should be a `path.relative()`d string, but got "../../tmp/crap.js"
    at throwError (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:337:9)
    at checkPath (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:356:12)
    at Ignore._test (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:473:5)
    at Ignore.ignores (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:512:17)
    at path (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:516:26)
    at Array.filter (<anonymous>)
    at Ignore.filter (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/node_modules/ignore/index.js:520:29)
    at /home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/deglob/index.js:46:31
    at end (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/run-parallel/index.js:18:15)
    at done (/home/pedro/.nvm/versions/node/v10.16.3/lib/node_modules/standard/node_modules/run-parallel/index.js:22:10)

but $ standard --fix file.js works as expected

@revington

This comment has been minimized.

Copy link
Author

commented Aug 22, 2019

I have the same error with standard@13 but not with standard@12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.