Skip to content

fix: probe for an executable at a relative dprint.path on Windows - #189

Merged
dsherret merged 1 commit into
mainfrom
fix-windows-path-probe
Oct 6, 2026
Merged

dsherret merged 1 commit into
mainfrom
fix-windows-path-probe

Conversation

@dsherret

@dsherret dsherret commented Oct 6, 2026

Copy link
Copy Markdown
Member

Fixes a dprint.path setting like .vscode/dprint no longer working on Windows when there's a .vscode/dprint.bat beside a .vscode/dprint shell script for other platforms (see dprint/dprint#859 (comment)). This regressed in #163 when dprint started being launched without cmd.exe where possible.

  • A non-absolute dprint.path containing a path separator (ex. .vscode/dprint or bin\dprint) is now resolved against the folder on Windows. Previously only paths starting with ./ or ../ were, so others were searched for relative to the extension host's cwd.
  • For a file path without an executable extension, the launchable PATHEXT extensions (.exe, .com, .cmd, .bat) are now probed before the path itself, like cmd.exe does. Previously the extensionless file won when it existed, which can't be launched when it's a shell script. This also helps $(yarn bin dprint), which resolves to a node_modules/.bin/dprint script beside a dprint.cmd.

Command names such as dprint are still searched for on the path as before and nothing changes on macOS and Linux.

@dsherret
dsherret merged commit 0867908 into main Oct 6, 2026
3 checks passed
@dsherret
dsherret deleted the fix-windows-path-probe branch October 6, 2026 21:33
@dsherret dsherret mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant