Skip to content

Conversation

@savetheclocktower
Copy link
Contributor

This is a fix for the bug I described here. This is an artifact of an earlier rewrite and updated exception handling; stderr now exists in another scope and is thrown, so we should catch it and treat error like a string.

I also noticed that, when stderr is empty, we just reject with an empty string in forkNpmRebuild. In that case, I figure a generic message with the failure code is better than an empty string, so I changed it. Happy to take that out if it bothers anyone.

I've not made much progress in figuring out how to hit this particular code path on demand, though! If I find a way, I'll update the PR.

@DeeDeeG
Copy link
Member

DeeDeeG commented Nov 5, 2025

I can confirm the stderr should be error now.

(It used to be stderr at this point in the history: https://github.com/pulsar-edit/ppm/blame/2cb92e55808c6c6f2011324d4b229be3035a552f/src/rebuild.js#L72-L74 but a refactor changed the variable in question's name to error without changing what's logged.)

Copy link
Member

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!!!

Thank you for this, when I read the description of the problem I was ready to investigate and open a PR, but lo and behold, here is such a PR. Brilliant.

Optional code suggestion below, otherwise, feel free to land this. 👍

Co-authored-by: DeeDeeG <[email protected]>
@DeeDeeG DeeDeeG merged commit d288b09 into master Nov 5, 2025
11 checks passed
@savetheclocktower savetheclocktower deleted the fix-misnamed-variable-in-rebuild branch November 5, 2025 07:33
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.

3 participants