From a3f3a8024ffa089f6c2a202d79c6b9a54cb23175 Mon Sep 17 00:00:00 2001 From: Natalie Carey Date: Tue, 20 Dec 2022 09:04:00 +0000 Subject: [PATCH] Using a standard user for initial commit. --- __tests__/spec/sanity-checks.js | 3 +-- bin/cli | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/__tests__/spec/sanity-checks.js b/__tests__/spec/sanity-checks.js index d7429635c0..87cc91440e 100644 --- a/__tests__/spec/sanity-checks.js +++ b/__tests__/spec/sanity-checks.js @@ -2,7 +2,6 @@ const assert = require('assert') const path = require('path') -const EOL = require('os').EOL const fs = require('fs-extra') const request = require('supertest') @@ -45,7 +44,7 @@ describe('The Prototype Kit', () => { await exec('git log', { cwd: tmpDir }, (data) => outputLines.push(data.toString())) function getLastMeaningfulLineTrimmed (outputLines) { - const meaningulLines = outputLines.join(EOL).split(EOL).filter(line => line !== '') + const meaningulLines = outputLines.join('').split('\n').filter(line => line !== '') return meaningulLines.pop().trim() } diff --git a/bin/cli b/bin/cli index 3079a0681b..d14d12fcbf 100755 --- a/bin/cli +++ b/bin/cli @@ -51,7 +51,7 @@ async function updatePackageJson (packageJsonPath) { async function initialiseGitRepo () { try { - return exec('git init && git add -A . && git commit -am "Created prototype kit."') + return exec('git init && git add -A . && git -c "user.email=gov.uk-prototype@digital.cabinet-office.gov.uk" -c "user.name=GOV.UK Prototype Kit" commit -am "Created prototype kit."') } catch (e) { console.log('error initialising git repo') console.log(e.message)