diff --git a/packages/create-react-app/index.js b/packages/create-react-app/index.js index cfdff5b6753..5cf790df9ed 100755 --- a/packages/create-react-app/index.js +++ b/packages/create-react-app/index.js @@ -212,6 +212,7 @@ function run(root, appName, version, verbose, originalDirectory, template) { if (!remainingFiles.length) { // Delete target folder if empty console.log('Deleting', chalk.cyan(appName + '/'), 'from', chalk.cyan(path.resolve(root, '..'))); + process.chdir(path.resolve(root, '..')); fs.removeSync(path.join(root)); } console.log('Done.');