Добавлена проверка на наличие установленного git в системе
This commit is contained in:
parent
a7676d5886
commit
cc85cdec78
2 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
module snag.lib.lib;
|
||||
|
||||
import std.regex;
|
||||
import std.process;
|
||||
|
||||
bool isValidHash(string hash) {
|
||||
auto hashPattern = ctRegex!r"^[a-fA-F0-9]{7}$";
|
||||
|
@ -11,3 +12,8 @@ bool isValidEmail(string email) {
|
|||
auto emailPattern = ctRegex!r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$";
|
||||
return !matchFirst(email, emailPattern).empty;
|
||||
}
|
||||
|
||||
bool checkGit() {
|
||||
auto result = execute(["which", "git"]);
|
||||
return !result.status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue