paolodellepiane / vscode-fantomas-fmt

MIT License
17 stars 4 forks source link

Unable to format code on Linux - `./fantomas: No such file or directory` #20

Open christianfosli opened 4 years ago

christianfosli commented 4 years ago

Environment

VsCode on Fedora Linux 33, with fantomas installed using dotnet tool install -g fantomas-tool

Issue

Triggering Fantomas with Ctrl-Shift-P >Format document gives the following error

[fantomas-fmt] Command failed with exit code 127: ./fantomas "/home/cfosli/.vscode/extensions/paolodellepiane.fantomas-fmt-0.3.0/fantomas.tmp.fs"/bin/sh: ./fantomas: No such file or directory
[fantomas-fmt] format failed

Additional info

I can use fantomas fine from the commandline, but I don't have a fantomas executable in the project directory. It is located in ~/.dotnet/tools/fantomas since I installed it as a global tool, as suggested in the extension README. It is available in $PATH, so in the commandline I can simply fantomas <filename>

Solution

See PR #21

AlexZeitler commented 3 years ago

Happens on macOS as well.

Nekroido commented 2 years ago

Please update the VSIX package at the VSCode Marketplace.

lulunac27a commented 1 week ago

The location of fantomas binary is /Users/<your username>/.dotnet/tools/fantomas.