Skip to content

Commit 7396fc0

Browse files
committed
fix(prettier): use correct prettier executable on windows (#236)
1 parent 4185249 commit 7396fc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/conform/formatters/prettier.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
local fs = require("conform.fs")
12
local util = require("conform.util")
23

34
--- Helper function to parse options to into a parser if available
@@ -49,7 +50,7 @@ return {
4950
-- qmd = "markdown",
5051
},
5152
},
52-
command = util.from_node_modules("prettier"),
53+
command = util.from_node_modules(fs.is_windows and "prettier.cmd" or "prettier"),
5354
args = function(self, ctx)
5455
return eval_parser(self, ctx) or { "--stdin-filepath", "$FILENAME" }
5556
end,

0 commit comments

Comments
 (0)