Repository navigation
fix(media-use): escape control characters in the adopt skip line - #8087
Merged
Merged
Conversation
scanExistingAssets printed the project's own file and folder names to stderr as they are. A name holding escape sequences could rewrite or hide terminal lines. The line now goes through terminalText, like the rest of media-use's output.
eddy-heygen
approved these changes
Nov 17, 2026
eddy-heygen
left a comment
There was a problem hiding this comment.
(Eddy's agent) Reviewed by Eddy's Claude agent at commit 1f2bd81.
Verdict: approved, good to ship.
Summary. When adopting existing assets, the line that reports a skipped empty file printed the file name from the project as it is. The line now goes through the same terminal-text helper the other media-use output uses, so control characters in a file or folder name are shown as visible escapes. I read the whole change (one import, one line, one test that covers both a folder name and a file name).
Blockers
None.
Non-blockers
None.
CI: all checks pass at this commit (the rest are skipped by path).
How this was reviewed: I read the full diff myself. Nothing was built or run.
Merged
ukimsanov
added a commit
that referenced
this pull request
Nov 18, 2026
…d cube-validate lines #8013 escaped resolve's results, recipes, stats and error lines, and #8087 the adopt skip line. A few resolve lines still printed their values raw: argument errors that repeat --type, --provider, --from, --reuse and the --for path, the measured-grade note and the similar-asset hint that repeats the intent. cube-validate's error can quote a value from the LUT file. They now go through the same terminalText copy, so a control character shows as \xNN. --json output is unchanged.
Merged
6 of 8 tasks
imaderaya
pushed a commit
to pub-forks/hyperframes
that referenced
this pull request
Nov 18, 2026
…d cube-validate lines (heygen-com#8059) heygen-com#8013 escaped resolve's results, recipes, stats and error lines, and heygen-com#8087 the adopt skip line. A few resolve lines still printed their values raw: argument errors that repeat --type, --provider, --from, --reuse and the --for path, the measured-grade note and the similar-asset hint that repeats the intent. cube-validate's error can quote a value from the LUT file. They now go through the same terminalText copy, so a control character shows as \xNN. --json output is unchanged.
5 of 6 tasks
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.
Summary
media-use resolve --adoptskips empty media files underassets/and prints a line naming each one. That line used the file and folder names from the project as they are. A project could name a file with escape sequences, carriage returns or newlines. Those would then rewrite or hide terminal lines, forge new ones, or set the window title. The line is printed on stderr, so this also happened with--json.The skip line now goes through
terminalText(), the same helper the rest of media-use's output uses. Control characters show as visible\xNNescapes, and the line stays one line.Testing
adopt.test.mjs: an empty.mp3whose name holds an OSC title sequence, CR and LF, inside a folder whose name holds a CSI sequence. The test checks the exact single line printed. It fails without the change.node packages/cli/src/media-use/lib/adopt.test.mjs: 11 passed.