rush-cli
rush-cli copied to clipboard
Build fails if file/directory paths contains whitespaces
Describe the bug
rush build
doesn't work on macos
To Reproduce Steps to reproduce the behavior:
- Make a project
- Run
rush build
to build it - Get an error
Expected behavior It should be built, as nothing is changed.
Screenshots (Sorry for the japanese screenshot)
javac: Support/.../classes is an invalid flag.
Usage: javac <options> <source files>
Use -help to view all options

Desktop (please complete the following information):
- OS: macOS Big Sur 11.4 (20F71)
- Rush Version v1.2.4
Additional context It seems like it is using "Application Support" folder which contains space in it, so javac is complaining about it.
Thanks for reporting this. Yes, you're correct, javac
is complaining because of the whitespace in the directory path. Here's a workaround until I ship a new release fixing this:
- Copy/Move everything inside the
Application Support/rush
directory to a place whose path has no whitespace. For e.g.,/home/rush
. - Then, export the
RUSH_DATA_DIR
environment variable and set its value as the path of the previously moved directory. - Build your extension with
rush build
.