kimi-code icon indicating copy to clipboard operation
kimi-code copied to clipboard

fix(test): remove shell-escaped newline from hooks runner test

Open panandicoding opened this issue 4 months ago • 1 comments

Related Issue

N/A (small test-only fix < 100 lines)

Description

The externalHooksRunner test "does not dedupe hooks that share a command but have different cwd" appends "\\n" to process.stdout.write(process.cwd()) via shell escaping. On Windows, cmd.exe misinterprets the escaped sequence and outputs the literal two characters \n instead of a newline, causing .trim() to fail to strip it and the assertion to fail.

Since the assertion already applies .trim() to the stdout, the trailing newline is unnecessary. Removing it makes the test pass on both Unix and Windows.

Checklist

  • [x] I have read the CONTRIBUTING document.
  • [x] I have linked the related issue, if any.
  • [x] I have added tests that prove my fix is effective or that my feature works.

panandicoding avatar Jul 25 '26 15:07 panandicoding

⚠️ No Changeset found

Latest commit: d2833cfdbfdb11b663433dcbbd16ff66124a4f50

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jul 25 '26 15:07 changeset-bot[bot]