Skip to content

Use path.sep when building path to temporary file#23

Open
dana-ross wants to merge 1 commit intosoderlind:masterfrom
dana-ross:feature/temp-file-path-separator
Open

Use path.sep when building path to temporary file#23
dana-ross wants to merge 1 commit intosoderlind:masterfrom
dana-ross:feature/temp-file-path-separator

Conversation

@dana-ross
Copy link
Copy Markdown

On Windows, os.tmpdir() uses backslashes as path separators.

github-actions bot added a commit that referenced this pull request Mar 9, 2026
…exit code 0

- Use path.join(TmpDir, ...) instead of TmpDir + "/..." for Windows
  path separator compatibility (addresses PR #23 from 2018)
- Reject the formatter Promise on exit code 0 (no fixable errors found),
  preventing the VS Code formatting spinner from hanging indefinitely
  (see issue #39, mirrors PR #41 and PR #48)
- Buffer all stdout output and display it as an error message when
  phpcbf exits with code 3; the previous conditional register of the
  stdout handler was dead code (phpcbfError was always false at check
  time) so users never saw the error detail
- Replace two separate conditional stdout handler registrations with a
  single always-registered handler that buffers output and logs to the
  console in debug mode

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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