Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
feat: 🎸 show nice error message when Git root not found
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jun 5, 2018
1 parent 15ff838 commit 54ed319
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/createState.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down

0 comments on commit 54ed319

Please sign in to comment.