Ensure license server always listens under PM2.

Skip auto-listen only when SKIP_LICENSE_LISTEN is set for tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-06-28 12:54:56 +08:00
parent 5aadc3d3a1
commit 4ac63f2889
2 changed files with 7 additions and 12 deletions
+1 -6
View File
@@ -190,12 +190,7 @@ export function createServer(options = {}) {
});
}
const entryPath = process.argv[1] ? path.resolve(process.argv[1]) : '';
const isMain =
entryPath !== '' &&
(fileURLToPath(import.meta.url) === entryPath || entryPath.endsWith(`${path.sep}server.mjs`));
if (isMain) {
if (!process.env.SKIP_LICENSE_LISTEN) {
const privateKeyPem = process.env.LICENSE_PRIVATE_KEY_PEM;
if (!privateKeyPem) {
console.error('Задайте LICENSE_PRIVATE_KEY_PEM (PKCS#8 PEM, Ed25519)');