AdguardTeam / AGLint

Universal adblock filter list linter
https://www.npmjs.com/package/@adguard/aglint
MIT License
51 stars 3 forks source link

Absolute file paths are mishandled #184

Closed scripthunter7 closed 10 months ago

scripthunter7 commented 1 year ago

Absolute file path is incorrectly concatenated:

D:\aglint-test>npx aglint D:\aglint-test\filter.txt
Oops! Something went wrong! :(

AGLint: 2.0.5

File "D:\aglint-test\D:\aglint-test\filter.txt" does not exist

  Error: File "D:\aglint-test\D:\aglint-test\filter.txt" does not exist
      at LinterCli.run (file:///D:/aglint-test/node_modules/@adguard/aglint/dist/aglint.esm.js:2122:27)
      at async file:///D:/aglint-test/node_modules/@adguard/aglint/dist/aglint.cli.js:221:9

By default, lint-staged parameters the linters with such absolute paths