From 11b77aa2b4ca617963728bee3ea8f977a0d3066e Mon Sep 17 00:00:00 2001 From: pomelo-nwu Date: Thu, 6 Nov 2025 15:12:08 +0800 Subject: [PATCH] fix: handle null command in verifyVSCode function --- packages/core/src/ide/detect-ide.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/ide/detect-ide.ts b/packages/core/src/ide/detect-ide.ts index 1f3e805d..c00d9a62 100644 --- a/packages/core/src/ide/detect-ide.ts +++ b/packages/core/src/ide/detect-ide.ts @@ -60,7 +60,10 @@ function verifyVSCode( if (ide.name !== IDE_DEFINITIONS.vscode.name) { return ide; } - if (ideProcessInfo.command.toLowerCase().includes('code')) { + if ( + ideProcessInfo.command && + ideProcessInfo.command.toLowerCase().includes('code') + ) { return IDE_DEFINITIONS.vscode; } return IDE_DEFINITIONS.vscodefork;