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 9304379 commit 151d462
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28627,8 +28627,8 @@ async function Activate() {
await licenseClient.ActivateLicenseWithConfig(servicesConfig);
}
else {
const username = core.getInput('username', { required: true });
const password = core.getInput('password', { required: true });
const username = core.getInput('username', { required: true }).trim();
const password = core.getInput('password', { required: true }).trim();
const serial = core.getInput('serial', { required: license.toLowerCase().startsWith('pro') });
await licenseClient.ActivateLicense(username, password, serial);
}
Expand Down Expand Up @@ -28858,6 +28858,7 @@ async function ShowEntitlements() {
async function ActivateLicense(username, password, serial) {
const args = [`--activate-ulf`, `--username`, username, `--password`, password];
if (serial !== undefined && serial.length > 0) {
serial = serial.trim();
args.push(`--serial`, serial);
const maskedSerial = serial.slice(0, -4) + `XXXX`;
core.setSecret(maskedSerial);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ async function Activate(): Promise<void> {
const servicesConfig = core.getInput('services-config', { required: true });
await licenseClient.ActivateLicenseWithConfig(servicesConfig);
} else {
const username = core.getInput('username', { required: true });
const password = core.getInput('password', { required: true });
const username = core.getInput('username', { required: true }).trim();
const password = core.getInput('password', { required: true }).trim();
const serial = core.getInput('serial', { required: license.toLowerCase().startsWith('pro') });
await licenseClient.ActivateLicense(username, password, serial);
}
Expand Down
1 change: 1 addition & 0 deletions src/licensing-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async function ShowEntitlements(): Promise<string[]> {
async function ActivateLicense(username: string, password: string, serial: string): Promise<void> {
const args = [`--activate-ulf`, `--username`, username, `--password`, password];
if (serial !== undefined && serial.length > 0) {
serial = serial.trim();
args.push(`--serial`, serial);
const maskedSerial = serial.slice(0, -4) + `XXXX`;
core.setSecret(maskedSerial);
Expand Down

0 comments on commit 151d462

Please sign in to comment.