Skip to content

Commit

Permalink
guard license check
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Nov 26, 2021
1 parent 4d65730 commit 377e1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions publish-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { createVSIX } = require('vsce');
const [namespace] = id.split('.');

let packagePath = context.repo;
if (extension.location) {
if (packagePath && extension.location) {
packagePath = path.join(packagePath, extension.location);
}

Expand Down Expand Up @@ -103,7 +103,7 @@ const { createVSIX } = require('vsce');
}
}
// TODO(ak) check license is open-source
if (!await ovsx.isLicenseOk(packagePath, manifest)) {
if (!manifest?.license && !(packagePath && await ovsx.isLicenseOk(packagePath, manifest))) {
throw new Error(`${extension.id}: license is missing`);
}

Expand Down

0 comments on commit 377e1d7

Please sign in to comment.