@@ -22,9 +22,9 @@ temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'`
22
22
function cleanup {
23
23
echo ' Cleaning up.'
24
24
ps -ef | grep ' react-scripts' | grep -v grep | awk ' {print $2}' | xargs kill -s 9
25
- cd $root_path
25
+ cd " $root_path "
26
26
# 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
28
28
}
29
29
30
30
# Error messages are redirected to stderr
@@ -42,7 +42,7 @@ function handle_exit {
42
42
}
43
43
44
44
function 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 " $@ "
46
46
}
47
47
48
48
# Check for the existence of one or more files.
79
79
# ******************************************************************************
80
80
81
81
# Pack CLI
82
- cd $root_path /packages/create-react-app
82
+ cd " $root_path " /packages/create-react-app
83
83
cli_path=$PWD /` npm pack`
84
84
85
85
# Go to react-scripts
86
- cd $root_path /packages/react-scripts
86
+ cd " $root_path " /packages/react-scripts
87
87
88
88
# Save package.json because we're going to touch it
89
89
cp package.json package.json.orig
90
90
91
91
# Replace own dependencies (those in the `packages` dir) with the local paths
92
92
# of those packages.
93
- node $root_path /tasks/replace-own-deps.js
93
+ node " $root_path " /tasks/replace-own-deps.js
94
94
95
95
# Finally, pack react-scripts
96
- scripts_path=$root_path /packages/react-scripts/` npm pack`
96
+ scripts_path=" $root_path " /packages/react-scripts/` npm pack`
97
97
98
98
# Restore package.json
99
99
rm package.json
@@ -104,12 +104,12 @@ mv package.json.orig package.json
104
104
# ******************************************************************************
105
105
106
106
# 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 "
109
109
110
110
# Install the app in a temporary location
111
111
cd $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
113
113
114
114
# ******************************************************************************
115
115
# 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
120
120
cd test-kitchensink
121
121
122
122
# Link to our preset
123
- npm link $root_path /packages/babel-preset-react-app
123
+ npm link " $root_path " /packages/babel-preset-react-app
124
124
125
125
# Test the build
126
126
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
@@ -172,16 +172,16 @@ E2E_FILE=./build/index.html \
172
172
# ******************************************************************************
173
173
174
174
# Unlink our preset
175
- npm unlink $root_path /packages/babel-preset-react-app
175
+ npm unlink " $root_path " /packages/babel-preset-react-app
176
176
177
177
# Eject...
178
178
echo yes | npm run eject
179
179
180
180
# ...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
185
185
186
186
# Test the build
187
187
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
0 commit comments