From 63a6bdc1d688791c577d125e74bd5126eda61dd1 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Mon, 16 Jan 2023 00:18:51 +0100 Subject: [PATCH] Terminate process if `.git` folder is not a repository (#3937) Terminate process if folder is not a repository --- build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 05e70c4d1..0a8df0130 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,16 @@ plugins { group = "com.plotsquared" version = "6.10.9-SNAPSHOT" +if (!File("$rootDir/.git").exists()) { + logger.lifecycle(""" + ************************************************************************************** + You need to fork and clone this repository! Don't download a .zip file. + If you need assistance, consult the GitHub docs: https://docs.github.com/get-started/quickstart/fork-a-repo + ************************************************************************************** + """.trimIndent() + ).also { kotlin.system.exitProcess(1) } +} + subprojects { group = rootProject.group version = rootProject.version