From 76a7dc00828ed3246bdb1d58e20e49ed64a04c0a Mon Sep 17 00:00:00 2001 From: abearxiong Date: Thu, 29 Jan 2026 01:56:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E9=94=AE=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E9=94=AE=E5=80=BC=E4=B8=8D=E4=BB=A5=E6=96=9C=E6=9D=A0?= =?UTF-8?q?=E5=BC=80=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assistant/src/command/run-scripts/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assistant/src/command/run-scripts/index.ts b/assistant/src/command/run-scripts/index.ts index 4adfc12..80fc651 100644 --- a/assistant/src/command/run-scripts/index.ts +++ b/assistant/src/command/run-scripts/index.ts @@ -13,7 +13,11 @@ const createRandomApp = (opts: { app: any, package: any, pwd: string, status?: s } if (!app.key) { const randomSuffix = Math.random().toString(36).substring(2, 8); - app.key = packageJson.basename || `${'unknown-app'}-${randomSuffix}`; + let appKey: string = packageJson.basename || `${'unknown-app'}-${randomSuffix}`; + if (appKey.startsWith('/')) { + appKey = appKey.slice(1) + } + app.key = appKey; } app.path = pwd; if (app.type === 'pm2-system-app' && !app.pm2Options) {