Terminate process if .git folder does not exist (#2070)

Terminate process if folder is not a repository
This commit is contained in:
Alexander Brandes 2023-01-15 20:24:51 +01:00 committed by GitHub
parent 606ffad12b
commit c0563b6574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,16 @@ plugins {
id("xyz.jpenilla.run-paper") version "2.0.1" 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(""" logger.lifecycle("""
******************************************* *******************************************
You are building FastAsyncWorldEdit! You are building FastAsyncWorldEdit!