git-mikado/src/commands/new_branch.ts

14 lines
297 B
TypeScript

import Git from 'simple-git';
async function check_workspace_clean() {
return Git().status().then( (result) => {
if(!result.isClean()) throw new Error('workspace not clean, aborting');
})
}
export default async () => {
await check_workspace_clean();
console.log( 'yay');
}