Skip to content

Commit

Permalink
fix(prettier): use correct prettier executable on windows (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Dec 24, 2023
1 parent 4185249 commit 7396fc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/conform/formatters/prettier.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local fs = require("conform.fs")
local util = require("conform.util")

--- Helper function to parse options to into a parser if available
Expand Down Expand Up @@ -49,7 +50,7 @@ return {
-- qmd = "markdown",
},
},
command = util.from_node_modules("prettier"),
command = util.from_node_modules(fs.is_windows and "prettier.cmd" or "prettier"),
args = function(self, ctx)
return eval_parser(self, ctx) or { "--stdin-filepath", "$FILENAME" }
end,
Expand Down

0 comments on commit 7396fc0

Please sign in to comment.