From c0563b6574f0947f22958f43bb97c212a416ac7b Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Sun, 15 Jan 2023 20:24:51 +0100 Subject: [PATCH] Terminate process if `.git` folder does not exist (#2070) 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 721bfe48f..993e049e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,6 +9,16 @@ plugins { id("xyz.jpenilla.run-paper") version "2.0.1" } +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) } +} + logger.lifecycle(""" ******************************************* You are building FastAsyncWorldEdit!