Добавлена проверка на инициализацию репозитория
This commit is contained in:
parent
38b37eea70
commit
a7676d5886
1 changed files with 6 additions and 0 deletions
|
@ -45,6 +45,12 @@ class Snag {
|
|||
}
|
||||
|
||||
void initialize() {
|
||||
auto result = execute(_baseCommand ~ ["rev-parse", "--git-dir"]);
|
||||
!result.status &&
|
||||
throw new SnagException(
|
||||
"The Git repository has already been initialized: "
|
||||
~ result.output.strip('\n')
|
||||
);
|
||||
git(
|
||||
["init"],
|
||||
"A Git repository initialization error occurred"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue