From d6dfdb9f59b4b28483bc9c3fd9395545210da35c Mon Sep 17 00:00:00 2001 From: James George Date: Sun, 28 Feb 2021 16:33:57 +0530 Subject: [PATCH] fix: deploy to heroku workflow (#216) --- src/commands/deploy/heroku.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/deploy/heroku.js b/src/commands/deploy/heroku.js index f4bdad049..0946f7af2 100644 --- a/src/commands/deploy/heroku.js +++ b/src/commands/deploy/heroku.js @@ -6,7 +6,7 @@ import inquirer from 'inquirer'; import path from 'path'; import * as logger from '../../utils/logger'; -import { fetchProjectConfig, readFileContent } from '../../utils/helpers'; +import { fetchProjectConfig } from '../../utils/helpers'; import { validateInput, validateInstallation } from '../../utils/validate'; /** @@ -163,7 +163,7 @@ export default async (templateDir) => { ]; let pkgJson = JSON.parse( - readFileContent(path.join('client', 'package.json')), + fs.readFileSync(path.join('client', 'package.json'), 'utf8'), ); const buildCmd = 'npm run build'; const postInstallScript = `if test \"$NODE_ENV\" = \"production\" ; then ${buildCmd} ; fi `; // eslint-disable-line @@ -193,7 +193,7 @@ export default async (templateDir) => { } await execa.command('git add .', { cwd: templateDir }); - await execa.command(`git commit -m "Add files"`, { cwd: templateDir }); + await execa('git', ['commit', '-m', 'Add files'], { cwd: templateDir }); await execa.command('git push heroku master', { stdio: 'inherit',