Skip to content

Commit eda43e2

Browse files
committed
Fix CI errors
1 parent eea0627 commit eda43e2

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

packages/create-react-app/createReactApp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function getInstallPackage(version, originalDirectory) {
588588
function getTemplateInstallPackage(template, originalDirectory) {
589589
let templateToInstall = 'create-react-app-template';
590590
if (template) {
591-
if (template.startsWith('file:')) {
591+
if (template.match(/^file:/)) {
592592
templateToInstall = `file:${path.resolve(
593593
originalDirectory,
594594
template.match(/^file:(.*)?$/)[1]

packages/react-scripts/scripts/init.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ module.exports = function(
153153

154154
if (fs.existsSync(templateJsonPath)) {
155155
const templateDependencies = require(templateJsonPath).dependencies;
156-
console.log(templateDependencies);
157156
args = args.concat(
158157
Object.keys(templateDependencies).map(key => {
159158
return `${key}@${templateDependencies[key]}`;
@@ -170,7 +169,8 @@ module.exports = function(
170169

171170
// Install template dependencies, and react and react-dom if missing.
172171
if ((!isReactInstalled(appPackage) || templateName) && args.length > 1) {
173-
console.log(`Installing react and react-dom using ${command}...`);
172+
console.log();
173+
console.log(`Installing template dependencies using ${command}...`);
174174
console.log();
175175

176176
const proc = spawn.sync(command, args, { stdio: 'inherit' });
@@ -184,11 +184,6 @@ module.exports = function(
184184
verifyTypeScriptSetup();
185185
}
186186

187-
if (tryGitInit(appPath)) {
188-
console.log();
189-
console.log('Initialized a git repository.');
190-
}
191-
192187
// Remove template
193188
console.log();
194189
console.log(`Removing template package using ${command}...`);
@@ -202,6 +197,11 @@ module.exports = function(
202197
return;
203198
}
204199

200+
if (tryGitInit(appPath)) {
201+
console.log();
202+
console.log('Initialized a git repository.');
203+
}
204+
205205
// Display the most elegant way to cd.
206206
// This needs to handle an undefined originalDirectory for
207207
// backward compatibility with old global-cli's.

tasks/e2e-kitchensink-eject.sh

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ set -x
6464
# Go to root
6565
cd ..
6666
root_path=$PWD
67+
# Set a Windows path for GitBash on Windows
68+
if [ $AGENT_OS == 'Windows_NT' ]; then
69+
root_path=$(cmd //c cd)
70+
fi
6771

6872
if hash npm 2>/dev/null
6973
then

0 commit comments

Comments
 (0)