Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Aug 15, 2024
1 parent 7dfc4ae commit 47718d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28835,11 +28835,8 @@ async function Version() {
}
async function ShowEntitlements() {
const output = await execWithMask([`--showEntitlements`]);
const matches = Array.from(output.matchAll(/Product Name: (?<license>.+)/g));
const matches = output.matchAll(/Product Name: (?<license>.+)/g);
const licenses = [];
if (!matches || matches.length === 0) {
return undefined;
}
for (const match of matches) {
if (match.groups.license) {
switch (match.groups.license) {
Expand All @@ -28859,7 +28856,7 @@ async function ShowEntitlements() {
return licenses;
}
async function ActivateLicense(username, password, serial) {
let args = [`--activate-ulf`, `--username`, username, `--password`, password];
const args = [`--activate-ulf`, `--username`, username, `--password`, password];
if (serial !== undefined && serial.length > 0) {
args.push(`--serial`, serial);
const maskedSerial = serial.slice(0, -4) + `XXXX`;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions src/licensing-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ async function Version(): Promise<void> {

async function ShowEntitlements(): Promise<string[]> {
const output = await execWithMask([`--showEntitlements`]);
const matches = Array.from(output.matchAll(/Product Name: (?<license>.+)/g));
const matches = output.matchAll(/Product Name: (?<license>.+)/g);
const licenses = [];
if (!matches || matches.length === 0) {
return undefined;
}
for (const match of matches) {
if (match.groups.license) {
switch (match.groups.license) {
Expand All @@ -155,7 +152,7 @@ async function ShowEntitlements(): Promise<string[]> {
}

async function ActivateLicense(username: string, password: string, serial: string): Promise<void> {
let args = [`--activate-ulf`, `--username`, username, `--password`, password];
const args = [`--activate-ulf`, `--username`, username, `--password`, password];
if (serial !== undefined && serial.length > 0) {
args.push(`--serial`, serial);
const maskedSerial = serial.slice(0, -4) + `XXXX`;
Expand Down

0 comments on commit 47718d9

Please sign in to comment.