Skip to content

build,test: guard eslint with crypto check

Currently, configuring --without-ssl will cause the lint-js target to fail with the following error:

$ make lint-js
Running JS linter...
internal/util.js:101
    throw new ERR_NO_CRYPTO();
    ^

Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support
at assertCrypto (internal/util.js:101:11)
at crypto.js:31:1
...
(/node/tools/node_modules/eslint/node_modules/file-entry-cache/cache.js:2:14)
at Module._compile (internal/modules/cjs/loader.js:746:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:757:10)
make: *** [lint-js] Error 1

There are also a number of tests that are affected in a similar way.

This commit adds crypto checks to allow for lint-js and the affected tests to be skipped when configured --without-ssl.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading