fix(commands): commit crash upon missing HEAD (#19)
This commit is contained in:
@@ -69,6 +69,7 @@ const command = new Command("commit")
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
try {
|
||||
const changedLines = (
|
||||
(
|
||||
await simpleGit().diff(["--numstat", stageAll ? "HEAD" : "--cached"])
|
||||
@@ -92,6 +93,9 @@ const command = new Command("commit")
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
note("HEAD hasn't been found, skipping commit line amount check");
|
||||
}
|
||||
|
||||
const type: string | symbol = await select({
|
||||
message: "Choose a commit type",
|
||||
|
||||
Reference in New Issue
Block a user