From 3da95d8b850374177c834160e4566905052877fb Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Dec 2022 08:59:53 +0000 Subject: [PATCH] Testing. --- __tests__/spec/sanity-checks.js | 1 + bin/cli | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/__tests__/spec/sanity-checks.js b/__tests__/spec/sanity-checks.js index b3afa2e4ef..d7429635c0 100644 --- a/__tests__/spec/sanity-checks.js +++ b/__tests__/spec/sanity-checks.js @@ -23,6 +23,7 @@ const createKitTimeout = parseInt(process.env.CREATE_KIT_TIMEOUT || '90000', 10) */ describe('The Prototype Kit', () => { beforeAll(async () => { + await exec('git config --global user.email "you@example.com" && git config --global user.name "Your Name"') await mkPrototype(tmpDir, { allowTracking: false, overwrite: true }) app = require(path.join(tmpDir, 'node_modules', 'govuk-prototype-kit', 'server.js')) diff --git a/bin/cli b/bin/cli index 7415f1530d..3079a0681b 100755 --- a/bin/cli +++ b/bin/cli @@ -50,7 +50,12 @@ async function updatePackageJson (packageJsonPath) { } async function initialiseGitRepo () { - return exec('git init && git add -A . && git commit -am "Created prototype kit."') + try { + return exec('git init && git add -A . && git commit -am "Created prototype kit."') + } catch (e) { + console.log('error initialising git repo') + console.log(e.message) + } } function usage () {