Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rage-against-the-pixel/unity-cli",
"version": "1.7.0",
"version": "1.7.1",
"description": "A command line utility for the Unity Game Engine.",
"author": "RageAgainstThePixel",
"license": "MIT",
Expand Down
17 changes: 10 additions & 7 deletions src/license-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,11 +638,7 @@ export class LicensingClient {
* @throws Error if deactivation fails.
*/
public async Deactivate(licenseType: LicenseType, token?: string): Promise<void> {
const activeLicenses = await this.GetActiveEntitlements();

if (activeLicenses.includes(licenseType)) {
await this.returnLicense(licenseType, token);
}
await this.returnLicense(licenseType, token);
}

/**
Expand Down Expand Up @@ -712,9 +708,16 @@ export class LicensingClient {
await this.exec([`--return-floating`, token]);
}
else {
await this.exec([`--return-ulf`]);
let activeLicenses = await this.GetActiveEntitlements();

const activeLicenses = await this.GetActiveEntitlements();
if (activeLicenses.includes(licenseType)) {
await this.exec([`--return-ulf`]);
} else {
this.logger.info(`No active license of type '${licenseType}' found`);
return;
}

activeLicenses = await this.GetActiveEntitlements();

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