Actually Fix CI
All checks were successful
minecraft-pi-reborn/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2022-07-15 20:09:51 -04:00
parent 3abbb0cb16
commit c3c7d22006
2 changed files with 5 additions and 2 deletions

View File

@ -142,7 +142,7 @@ static void set_env_if_unset(const char *env_name, std::function<std::string()>
#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");
}

View File

@ -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