diff --git a/lib/createState.js b/lib/createState.js index d7054905..92378b46 100644 --- a/lib/createState.js +++ b/lib/createState.js @@ -2,7 +2,14 @@ const getGitRootDir = require('./util/getGitRootDir'); const getConfig = require('./getConfig'); const createState = () => { - const root = getGitRootDir(); + let root; + + try { + root = getGitRootDir(); + } catch (error) { + throw new Error('Could not find Git root folder.'); + } + const state = { answers: { body: '',