Fix: npm run build:apps path resolution for paths with spaces - #740
Merged
AllTerrainDeveloper merged 3 commits intoSep 3, 2026
Merged
Conversation
AllTerrainDeveloper
approved these changes
Sep 3, 2026
AllTerrainDeveloper
left a comment
Collaborator
There was a problem hiding this comment.
Thanks! LGTM!
AllTerrainDeveloper
enabled auto-merge (squash)
September 3, 2026 10:05
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?
Closes #738
Fixes the bug where
npm run build:apps(andnpm run build) fails withENOENTwhen the repository is located in a directory path containing spaces.Why?
bin/build-apps.mjspreviously resolved the project root directory usingnew URL( '..', import.meta.url ).pathname, which resolved spaces to %20, causingreaddirSyncto receive an invalid filesystem path and build failed withENOENT: no such file or directory.How?
bin/build-apps.mjs:fileURLToPathfromnode:urlto correctly resolve and decode the native filesystem path for the project root.existsSync( appsDir )guard matchingvite.config.jsto safely exit with code0if noappsdirectory exists.Testing Instructions
Local Sites/or/tmp/test space/desktop-mode).npm run build:appsornpm run build.code-blue,my-wordpress,os-settings,trash) compile successfully intoassets/js/apps/with exit code0.Use of AI Tools
AI assistance: Yes
Tool(s): Antigravity
Model(s): Gemini
Used for: Investigating the build error and suggesting changes. Final decisions and edits were made by me.