Skip to content

Commit 51476fd

Browse files
committed
fix cppcheck commandline bug
1 parent 5d8c324 commit 51476fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/EIDEProjectExplorer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5788,8 +5788,9 @@ export class ProjectExplorer implements CustomConfigurationProvider {
57885788
GlobalEvent.emit('msg', ExceptionToMessage(err));
57895789
});
57905790

5791-
this.cppcheck_out.append(`>>> Exec cppcheck\n -> ${exeFile.name} ${cmds.join(' ')}\n\n`);
5792-
process.Run(exeFile.name, cmds, opts);
5791+
const _args: string[] = cmds.map(s => (s.includes(' ') && !s.trimStart().startsWith('"')) ? `"${s}"` : s);
5792+
this.cppcheck_out.append(`>>> Exec cppcheck\n -> ${exeFile.name} ${_args.join(' ')}\n\n`);
5793+
process.Run(exeFile.name, _args, opts);
57935794
});
57945795
});
57955796
}

0 commit comments

Comments
 (0)