Skip to content

Commit

Permalink
load license file
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Emms committed Dec 8, 2021
1 parent cd5fec0 commit 8735b79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/server/ee/src/license-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* See License.enterprise.txt in the project root folder.
*/

import * as fs from "fs";
import { LicenseKeySource } from "@gitpod/licensor/lib";
import { inject, injectable } from "inversify";
import { LicenseDB } from "@gitpod/gitpod-db/lib";
Expand All @@ -17,6 +18,11 @@ export class DBLicenseKeySource implements LicenseKeySource {

async getKey(): Promise<{ key: string; domain: string; }> {
let key: string = "";

if (this.config.licenseFile) {
// License is in a file - read and populate the license key
this.config.license = fs.readFileSync(this.config.licenseFile, "utf-8");
}
log.info(`license - ${this.config.license}`)
log.info(`licenseFile - ${this.config.licenseFile}`)
try {
Expand Down

0 comments on commit 8735b79

Please sign in to comment.