Fix command execution in checkDevChatDependency function

- Enclosed the pipxDevChat command in quotes to ensure correct execution, especially when the path contains spaces.
This commit is contained in:
bobo.yang 2023-07-06 09:06:48 +08:00
parent 8f846e2d62
commit 46ea8cc436

View File

@ -63,7 +63,7 @@ export function checkDevChatDependency(pythonCommand: string): boolean {
try { try {
// Check if DevChat is installed // Check if DevChat is installed
const pipxDevChat = path.join(pipxBinPath!, 'devchat'); const pipxDevChat = path.join(pipxBinPath!, 'devchat');
runCommand(`${pipxDevChat} --help`); runCommand(`"${pipxDevChat}" --help`);
UiUtilWrapper.updateConfiguration('DevChat', 'DevChatPath', pipxDevChat); UiUtilWrapper.updateConfiguration('DevChat', 'DevChatPath', pipxDevChat);
const error_status = `DevChat has installed.`; const error_status = `DevChat has installed.`;