microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
184 stars 55 forks source link

/bin/bash: -c: 行 1: An unexpected sign ")" #543

Open SeasClouds opened 6 months ago

SeasClouds commented 6 months ago

When processing dryrun.log, redundant ") "occurs, causing an error. image dryrun.log image

"dryrun.log" and dryRunOutputStr content is different. image

gcampbell-msft commented 6 months ago

@SeasClouds Thanks for posting this issue, we'll place it on our backlog of things to investigate. Could you confirm for me what versions this issue appears on? Thanks!

SeasClouds commented 6 months ago

Both v0.7.0 and v0.8.22 have this problem。I'm not sure there was a problem with the previous version

gcampbell-msft commented 2 months ago

@SeasClouds Revisiting this, what is the issue? Does it seem like we're manually adding an erroneous parenthesis?

SeasClouds commented 2 months ago

@gcampbell-msft dry-run out

(    echo '  CC      a.o' ; gcc -MD -MP -MF a.o.d -MT a.o  -c -o a.o a.c ) && ( printf '\n%s\n' 'a.o := gcc -MD -MP -MF a.o.d -MT a.o  -c -o a.o a.c' >> a.o.d )

parseLineAsTool Function return arguments: gcc -MD -MP -MF a.o.d -MT a.o -c -o a.o a.c )

gcampbell-msft commented 2 months ago

@SeasClouds Are those parenthesis required?

gcampbell-msft commented 2 months ago

makefile-tools.zip

Could you download the above, change the extension to .vsix, and let me know if that fixes your issue?

SeasClouds commented 2 months ago

@gcampbell-msft This can solve the problem. Whether this method is not general enough, if it is other characters have to modify the code again

Yingzi1234 commented 2 months ago

@gcampbell-msft The user have solved the problem by following the above methodology.