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:
+1
-6
@@ -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)');
|
||||
|
||||
Reference in New Issue
Block a user