diff --git a/scripts/pico_project.py b/scripts/pico_project.py index a45a557f..1748bc55 100644 --- a/scripts/pico_project.py +++ b/scripts/pico_project.py @@ -598,7 +598,7 @@ def GenerateCMake(folder, params): # Get project name for line in lines: if "add_executable" in line: - newProjectName = line.split('(')[1].strip().strip("()") + newProjectName = line.split('(')[1].split()[0].strip().strip("()") if params["wantThreadsafeBackground"] or params["wantPoll"]: newProjectName = newProjectName.replace("_background", "") newProjectName = newProjectName.replace("_poll", "") diff --git a/src/utils/cmakeUtil.mts b/src/utils/cmakeUtil.mts index 1dcbe02c..b055e05b 100644 --- a/src/utils/cmakeUtil.mts +++ b/src/utils/cmakeUtil.mts @@ -117,6 +117,14 @@ export async function configureCmakeNinja(folder: Uri): Promise { const child = exec(command, { env: customEnv, cwd: folder.fsPath, + }, (error, stdout, stderr) => { + if (error) { + console.error(error); + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); + } + + return; }); child.on("error", err => {