Skip to content

Commit e60a691

Browse files
- when returning license, skip GetActiveEntitlements for floating licenses
1 parent 0ed2c64 commit e60a691

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rage-against-the-pixel/unity-cli",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"description": "A command line utility for the Unity Game Engine.",
55
"author": "RageAgainstThePixel",
66
"license": "MIT",

src/license-client.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -638,11 +638,7 @@ export class LicensingClient {
638638
* @throws Error if deactivation fails.
639639
*/
640640
public async Deactivate(licenseType: LicenseType, token?: string): Promise<void> {
641-
const activeLicenses = await this.GetActiveEntitlements();
642-
643-
if (activeLicenses.includes(licenseType)) {
644-
await this.returnLicense(licenseType, token);
645-
}
641+
await this.returnLicense(licenseType, token);
646642
}
647643

648644
/**
@@ -712,9 +708,16 @@ export class LicensingClient {
712708
await this.exec([`--return-floating`, token]);
713709
}
714710
else {
715-
await this.exec([`--return-ulf`]);
711+
let activeLicenses = await this.GetActiveEntitlements();
716712

717-
const activeLicenses = await this.GetActiveEntitlements();
713+
if (activeLicenses.includes(licenseType)) {
714+
await this.exec([`--return-ulf`]);
715+
} else {
716+
this.logger.info(`No active license of type '${licenseType}' found`);
717+
return;
718+
}
719+
720+
activeLicenses = await this.GetActiveEntitlements();
718721

719722
if (activeLicenses.includes(licenseType)) {
720723
throw new Error(`Failed to return license of type '${licenseType}'`);

0 commit comments

Comments
 (0)