format error on windows.
liudonghua123 opened this issue · 0 comments
liudonghua123 commented
I installed foxundermoon.shell-format-7.1.0
in my vscode on Windows platform, and I also downloaded https://github.com/mvdan/sh/releases/download/v3.2.4/shfmt_v3.2.4_windows_386.exe to c:\Users\Liu.D.H\.vscode\extensions\foxundermoon.shell-format-7.1.0\bin\shfmt_v3.2.4_windows_386.exe
according to the output prompt.
However, I always got the following errors. And some seconds later, the c:\Users\Liu.D.H\.vscode\extensions\foxundermoon.shell-format-7.1.0\bin\shfmt_v3.2.4_windows_386.exe
was deleted.
shfmt hasn't downloaded yet!Error: spawnSync c:\Users\Liu.D.H\.vscode\extensions\foxundermoon.shell-format-7.1.0\bin\shfmt_v3.2.4_windows_386.exe UNKNOWN
Shfmt will be downloaded automatically!
download url: https://github.com/mvdan/sh/releases/download/v3.2.4/shfmt_v3.2.4_windows_386.exe
download to: c:\Users\Liu.D.H\.vscode\extensions\foxundermoon.shell-format-7.1.0\bin\shfmt_v3.2.4_windows_386.exe
If the download fails, you can manually download it to the dest directory.
Or download to another directory, and then set the "shellformat.path" as the path
download shfmt page: https://github.com/mvdan/sh/releases
You can't use this plugin until the download is successful.
Effective shfmt flags: -bn,-ci,-i,2
I checked the code, it seems this error was produced via
vs-shell-format/src/shFormat.ts
Line 164 in 9b735c1