Repository navigation
fix(stellar-scaffold-cli): pass pnpm reporter flag before run - #653
Merged
Merged
Conversation
pnpm forwards arguments after the script name to the script, so `pnpm run build --reporter=silent` handed the flag to tsc and client generation failed. Move package-manager flags ahead of `run` and add a test that the script name is the last build argument.
Contributor
|
Thanks Elliot! I reproduced this locally, the npm reorder is totally fine and the new tests are helpful against this coming back. I appreciate it! This also helped surface a new bug: |
zachfedor
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Contract client generation fails for every contract in pnpm projects. On my machine, it was throwing something like this:
$ tsc --reporter=silent error TS5023: Unknown compiler option '--reporter=silent'.PackageManager::buildrunspnpm run build --reporter=silent. pnpm forwards anything after the script name (e.g.,build) to the script, so the flag gets sent along to thetsccommand.To reproduce:
stellar scaffold init -p pnpm, thenstellar scaffold build. Also, the error is seen when usingpnpm devor the watch command that re-compiles and re-generates clients when changes are detected.Fix
build_command()out ofbuild(), so the build arguments can be tested without actually running the commandsrunfor pnpm (the fix) and npm (for consistency; npm accepts either order. happy to reverse this, though, if you want)buildscript name is the last argument for every package managerThe
installcalls are unaffected, since pnpm reads flags afterinstallitself.