rush-cli icon indicating copy to clipboard operation
rush-cli copied to clipboard

Build fails if file/directory paths contains whitespaces

Open Steve-0628 opened this issue 3 years ago • 1 comments

Describe the bug rush build doesn't work on macos

To Reproduce Steps to reproduce the behavior:

  1. Make a project
  2. Run rush build to build it
  3. 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
image

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.

Steve-0628 avatar Dec 21 '21 07:12 Steve-0628

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:

  1. Copy/Move everything inside the Application Support/rush directory to a place whose path has no whitespace. For e.g., /home/rush.
  2. Then, export the RUSH_DATA_DIR environment variable and set its value as the path of the previously moved directory.
  3. Build your extension with rush build.

shreyashsaitwal avatar Dec 21 '21 10:12 shreyashsaitwal