From a7676d5886a036f2fe5b0a577aea64ca6ce91cf1 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Mon, 26 May 2025 02:41:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D0=B8=D0=BD=D0=B8=D1=86=D0=B8=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20=D1=80=D0=B5=D0=BF=D0=BE?= =?UTF-8?q?=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/snag/core/core.d | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/snag/core/core.d b/source/snag/core/core.d index e528ab1..b114dd7 100644 --- a/source/snag/core/core.d +++ b/source/snag/core/core.d @@ -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"