Skip to content

Commit 1199485

Browse files
committed
Fix CI errors
1 parent 5c159bb commit 1199485

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

packages/create-react-app/createReactApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ function getInstallPackage(version, originalDirectory) {
597597
function getTemplateInstallPackage(template, originalDirectory) {
598598
let templateToInstall = 'create-react-app-template';
599599
if (template) {
600-
if (template.startsWith('file:')) {
600+
if (template.match(/^file:/)) {
601601
templateToInstall = `file:${path.resolve(
602602
originalDirectory,
603603
template.match(/^file:(.*)?$/)[1]

packages/react-scripts/scripts/init.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ module.exports = function(
190190

191191
if (fs.existsSync(templateJsonPath)) {
192192
const templateDependencies = require(templateJsonPath).dependencies;
193-
console.log(templateDependencies);
194193
args = args.concat(
195194
Object.keys(templateDependencies).map(key => {
196195
return `${key}@${templateDependencies[key]}`;
@@ -207,7 +206,8 @@ module.exports = function(
207206

208207
// Install template dependencies, and react and react-dom if missing.
209208
if ((!isReactInstalled(appPackage) || templateName) && args.length > 1) {
210-
console.log(`Installing react and react-dom using ${command}...`);
209+
console.log();
210+
console.log(`Installing template dependencies using ${command}...`);
211211
console.log();
212212

213213
const proc = spawn.sync(command, args, { stdio: 'inherit' });
@@ -221,11 +221,6 @@ module.exports = function(
221221
verifyTypeScriptSetup();
222222
}
223223

224-
if (tryGitInit(appPath)) {
225-
console.log();
226-
console.log('Initialized a git repository.');
227-
}
228-
229224
// Remove template
230225
console.log();
231226
console.log(`Removing template package using ${command}...`);
@@ -239,6 +234,11 @@ module.exports = function(
239234
return;
240235
}
241236

237+
if (tryGitInit(appPath)) {
238+
console.log();
239+
console.log('Initialized a git repository.');
240+
}
241+
242242
// Display the most elegant way to cd.
243243
// This needs to handle an undefined originalDirectory for
244244
// backward compatibility with old global-cli's.

tasks/e2e-kitchensink-eject.sh

Lines changed: 4 additions & 0 deletions
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)