fix(scripts): remove duplicate bundle rmSync in clean script#2964
Open
chinesepowered wants to merge 1 commit intoQwenLM:mainfrom
Open
fix(scripts): remove duplicate bundle rmSync in clean script#2964chinesepowered wants to merge 1 commit intoQwenLM:mainfrom
chinesepowered wants to merge 1 commit intoQwenLM:mainfrom
Conversation
scripts/clean.js deleted the bundle directory twice. The second call was harmless (the first already removed it) but clearly a copy-paste leftover from when RMRF_OPTIONS was introduced.
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.
Remove duplicate
bundledirectory rmSync in clean script.TLDR
scripts/clean.jsdeleted thebundledirectory twice — once on line 30 and again on line 36 (after theRMRF_OPTIONSconstant was introduced). The second call was a harmless no-op but clearly a copy-paste leftover from when the helper constant was added. This PR removes the duplicate.Screenshots / Video Demo
N/A — build-tooling cleanup, no user-visible behavior change.
Dive Deeper
Before:
The
bundlepath is deleted on line 30, then again on line 36 after theRMRF_OPTIONSconstant appears. When the constant was introduced, the author likely meant to clean a different directory and never updated the path argument — the second call is effectively dead code.It's harmless (
rmSyncwithforce: trueis idempotent against missing paths) but it's a bug of intent: either the original call on line 30 should useRMRF_OPTIONS, or the line 36 call should target a different path, or — the simplest resolution — the duplicate should just be deleted.This PR deletes line 36.
Modified file:
scripts/clean.js— remove duplicatebundlermSyncReviewer Test Plan
pnpm clean(ornode scripts/clean.js) — verify thebundledirectory is still removedgrep -n "bundle" scripts/clean.jsshould show a single remaining referenceTesting Matrix