From c3c7d22006e1d83ad9cc88044b16cb13d0d3ce8f Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 15 Jul 2022 20:09:51 -0400 Subject: [PATCH] Actually Fix CI --- launcher/src/client/launcher.cpp | 2 +- scripts/test.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/launcher/src/client/launcher.cpp b/launcher/src/client/launcher.cpp index f1744cbb..a108198c 100644 --- a/launcher/src/client/launcher.cpp +++ b/launcher/src/client/launcher.cpp @@ -142,7 +142,7 @@ static void set_env_if_unset(const char *env_name, std::function #define LIST_DIALOG_SIZE "400" int main(int argc, char *argv[]) { // Don't Run As Root - if (getuid() == 0 || geteuid() == 0) { + if (getenv("_MCPI_SKIP_ROOT_CHECK") == NULL && (getuid() == 0 || geteuid() == 0)) { ERR("Don't Run As Root"); } diff --git a/scripts/test.sh b/scripts/test.sh index b11da7b5..d8e8558c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -23,9 +23,12 @@ cd ../../ ./scripts/setup.sh client "${ARCH}" -DMCPI_HEADLESS_MODE=ON ./scripts/build.sh client "${ARCH}" -# Add minecraft-pi-reborn-server To PATH +# Add minecraft-pi-reborn-client To PATH export PATH="$(pwd)/out/client-$(dpkg-architecture -qDEB_BUILD_ARCH)/usr/bin:${PATH}" +# Skip Root Check +export _MCPI_SKIP_ROOT_CHECK=1 + # Run Benchmark export HOME="$(pwd)/build/test" minecraft-pi-reborn-client --default --benchmark