Skip to content

Commit

Permalink
fix: licencefile glob on windows (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
codepunkt authored Oct 6, 2021
1 parent 67fd72d commit 769ede5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/license-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class LicensePlugin {

// Read license file, if it exists.
const cwd = this._cwd || process.cwd();
const absolutePath = path.join(dir, 'LICENSE*');
const absolutePath = path.join(dir, '[lL][iI][cC][eE][nN][cCsS][eE]*');
const relativeToCwd = path.relative(cwd, absolutePath);
const licenseFile = this._findGlob(relativeToCwd, cwd)[0];
if (licenseFile) {
Expand Down Expand Up @@ -343,7 +343,6 @@ class LicensePlugin {
_findGlob(pattern, cwd) {
return glob.sync(pattern, {
cwd,
nocase: true,
});
}

Expand Down

0 comments on commit 769ede5

Please sign in to comment.