Skip to content

fix: quote wallet build output path#6

Open
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:masterfrom
manuelsampedro1:codex/wallet-build-output-path-quoting
Open

fix: quote wallet build output path#6
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:masterfrom
manuelsampedro1:codex/wallet-build-output-path-quoting

Conversation

@manuelsampedro1

Copy link
Copy Markdown

This hardens the wallet build script so the configured distribution folder is handled safely.

Changes:

  • fail early with a clear usage message when no dist folder is provided
  • quote every dist-folder path expansion used by mkdir/cp/babel/uglify/html-minifier/cleancss/rm
  • preserve the existing build flow and generated filenames

This prevents confusing shell failures when the output path is empty or contains spaces.

Validation:

  • bash -n build.sh
  • ./build.sh without arguments returns the new usage error before invoking npm
  • stubbed build-tool smoke test against /tmp/bitgesell wallet dist test confirmed quoted paths with spaces reach the expected outputs

Bounty context: BitgesellOfficial/bitgesell#39

@MyTH-zyxeon

Copy link
Copy Markdown

Maintainer review note for the #81/#39 bounty queue:

I checked head be2ff3e: this is a focused build-script portability fix, not a wallet runtime/key-handling change. The useful behavior is quoting the dist-folder path across mkdir, cp, Babel, UglifyJS, rm, HTML minification, and CleanCSS, while adding an explicit missing-argument guard before running the build.

Acceptance checks:

  • Run the existing build script with a dist folder containing spaces, for example ./build.sh "dist test", and confirm app.min.js, index.html, and custom.min.css land under that exact directory.
  • Confirm the new empty-argument guard exits before npm test, so an accidental missing dist path fails fast without writing to the repo root.
  • Verify the generated assets are byte-equivalent or intentionally minifier-equivalent for a normal dist path without spaces.
  • Keep this scoped to build artifact path handling only; no wallet seed/key generation, storage, transaction, or runtime behavior should change.

No wallet/key/live-chain scope; this is build-path hygiene only.

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.

2 participants