@@ -22,9 +22,9 @@ temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'`
2222function cleanup {
2323 echo ' Cleaning up.'
2424 ps -ef | grep ' react-scripts' | grep -v grep | awk ' {print $2}' | xargs kill -s 9
25- cd $root_path
25+ cd " $root_path "
2626 # TODO: fix "Device or resource busy" and remove ``|| $CI`
27- rm -rf $temp_cli_path $temp_app_path || $CI
27+ rm -rf " $temp_cli_path " $temp_app_path || $CI
2828}
2929
3030# Error messages are redirected to stderr
@@ -42,7 +42,7 @@ function handle_exit {
4242}
4343
4444function create_react_app {
45- node " $temp_cli_path " /node_modules/create-react-app/index.js $*
45+ node " $temp_cli_path " /node_modules/create-react-app/index.js " $@ "
4646}
4747
4848# Check for the existence of one or more files.
7979# ******************************************************************************
8080
8181# Pack CLI
82- cd $root_path /packages/create-react-app
82+ cd " $root_path " /packages/create-react-app
8383cli_path=$PWD /` npm pack`
8484
8585# Go to react-scripts
86- cd $root_path /packages/react-scripts
86+ cd " $root_path " /packages/react-scripts
8787
8888# Save package.json because we're going to touch it
8989cp package.json package.json.orig
9090
9191# Replace own dependencies (those in the `packages` dir) with the local paths
9292# of those packages.
93- node $root_path /tasks/replace-own-deps.js
93+ node " $root_path " /tasks/replace-own-deps.js
9494
9595# Finally, pack react-scripts
96- scripts_path=$root_path /packages/react-scripts/` npm pack`
96+ scripts_path=" $root_path " /packages/react-scripts/` npm pack`
9797
9898# Restore package.json
9999rm package.json
@@ -104,12 +104,12 @@ mv package.json.orig package.json
104104# ******************************************************************************
105105
106106# Install the CLI in a temporary location
107- cd $temp_cli_path
108- npm install $cli_path
107+ cd " $temp_cli_path "
108+ npm install " $cli_path "
109109
110110# Install the app in a temporary location
111111cd $temp_app_path
112- create_react_app --scripts-version=$scripts_path --internal-testing-template=$root_path /packages/react-scripts/fixtures/kitchensink test-kitchensink
112+ create_react_app --scripts-version=" $scripts_path " --internal-testing-template=" $root_path " /packages/react-scripts/fixtures/kitchensink test-kitchensink
113113
114114# ******************************************************************************
115115# Now that we used create-react-app to create an app depending on react-scripts,
@@ -120,7 +120,7 @@ create_react_app --scripts-version=$scripts_path --internal-testing-template=$ro
120120cd test-kitchensink
121121
122122# Link to our preset
123- npm link $root_path /packages/babel-preset-react-app
123+ npm link " $root_path " /packages/babel-preset-react-app
124124
125125# Test the build
126126REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
@@ -172,16 +172,16 @@ E2E_FILE=./build/index.html \
172172# ******************************************************************************
173173
174174# Unlink our preset
175- npm unlink $root_path /packages/babel-preset-react-app
175+ npm unlink " $root_path " /packages/babel-preset-react-app
176176
177177# Eject...
178178echo yes | npm run eject
179179
180180# ...but still link to the local packages
181- npm link $root_path /packages/babel-preset-react-app
182- npm link $root_path /packages/eslint-config-react-app
183- npm link $root_path /packages/react-dev-utils
184- npm link $root_path /packages/react-scripts
181+ npm link " $root_path " /packages/babel-preset-react-app
182+ npm link " $root_path " /packages/eslint-config-react-app
183+ npm link " $root_path " /packages/react-dev-utils
184+ npm link " $root_path " /packages/react-scripts
185185
186186# Test the build
187187REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
0 commit comments