Skip to content
Discussion options

You must be logged in to vote

@the-mikedavis yes, thank you for the solution. It is dependent on the shell you are targeting. With pwsh, you have to use -c flag (for command) to run a file:

[[language]]
name = "markdown"
formatter = { command = "pwsh", args = ["-noprofile", "-c", ".", "$env:PS_SCRIPTS\\format_md.ps1"]}
auto-format = true

. <script path>.ps1 is PowerShell's syntax of executing a script, that is why you have . as the first argument to -c.

I hereby mark this as solved.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tahir-hassan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #12843 on February 12, 2025 15:53.