Closed
Description
Hello,
while using Bash IDE 1.3.2 I keep getting these kind of errors from the bash-language-server component (v1.5.2):
[...]
Analyzing file:///home/user/myproject/target/coverage/bash-helper.sh
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/home/user/myproject/target/coverage/run_tests.sh'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at paths.forEach.p (/usr/lib/node_modules/bash-language-server/out/analyser.js:64:91)
at Array.forEach (<anonymous>)
at glob (/usr/lib/node_modules/bash-language-server/out/analyser.js:60:27)
at f (/usr/lib/node_modules/bash-language-server/node_modules/once/once.js:25:25)
at Glob.<anonymous> (/usr/lib/node_modules/bash-language-server/node_modules/glob/glob.js:151:7)
at emitOne (events.js:116:13)
at Glob.emit (events.js:211:7)
at Glob._finish (/usr/lib/node_modules/bash-language-server/node_modules/glob/glob.js:197:8)
Analyzing file:///home/user/myproject/target/coverage/run_tests.sh
[Error - 11:29:29] Connection to server got closed. Server will not be restarted.
This is due to the fact that the /home/user/myproject/target/coverage/run_tests.sh
is a symlink to a directory, that kcov automatically created to mimic the name of the file that originated the report. This causes the language server to crash continuously, reaching the retry attempts limit, as noted in the last line of output.
As suggested also in #47, I think that using the mime type information or, in any case, performing some kind of check on the file prior to opening it for analysis would solve this issue too.
I'm running on a Slackware64 Linux 14.2 box, using VS Code 1.25.0.