Skip to content

Commit f80bef3

Browse files
BayheckBayheck
and
Bayheck
authored
fix: license checker fixed for publishing (#8222)
<!-- Thank you for your contribution. Before making a PR, please read our contributing guidelines at https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution We recommend creating a *draft* PR, so that you can mark it as 'ready for review' when you are done. --> ## Purpose _Describe the problem you want to address or the feature you want to implement._ ## Approach _Describe how your changes address the issue or implement the desired functionality in as much detail as possible._ ## References _Provide a link to the existing issue(s), if any._ ## Pre-Merge TODO - [ ] Write tests for your proposed changes - [ ] Make sure that existing tests do not fail Co-authored-by: Bayheck <adil.rakhaliyev@devexpress.com>
1 parent 31a6fbe commit f80bef3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/dependency-licenses-checker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require('path');
2+
const fs = require('fs');
23
const licenseChecker = require('license-checker').init;
34

45
const PERMISSIVE_LICENSES = [
@@ -32,7 +33,7 @@ const INCOMPATIBLE_LICENSES_RE = /GPL/i;
3233
const hasIncompatibleLicenses = license => INCOMPATIBLE_LICENSES_RE.test(license);
3334
const hasUnknownLicenses = license => PERMISSIVE_LICENSES.indexOf(license) === -1;
3435

35-
const modulePath = path.join(__dirname, '../temp');
36+
const modulePath = fs.existsSync(path.join(__dirname, '../temp')) || path.join(__dirname, '../');
3637

3738
function checkLicense (license, module) {
3839
const unknownModuleAssertionMsg = `The module '${module}' contains an unknown license '${license}'. You can add this license to the list of known permissive licenses. But be cautious and do this only if you are sure that this license is compatible with TestCafe`;

0 commit comments

Comments
 (0)