From 3e437e49574eb9fe21ea4ee62a1975cd1be91e40 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Tue, 2 Apr 2024 21:31:02 +0300 Subject: [PATCH] Alternative check --- tests/RequireByString.test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/RequireByString.test.cpp b/tests/RequireByString.test.cpp index 5ed7f7a1..7b182d3d 100644 --- a/tests/RequireByString.test.cpp +++ b/tests/RequireByString.test.cpp @@ -89,9 +89,7 @@ public: std::string luauDirRel = "."; std::string luauDirAbs; -#if !__APPLE__ || !TARGET_OS_IPHONE - std::optional cwd = getCurrentWorkingDirectory(); -#else +#if TARGET_OS_IPHONE std::optional cwd0 = getCurrentWorkingDirectory(); std::optional cwd = getResourcePath(); if (cwd && cwd0) @@ -105,6 +103,8 @@ public: luauDirRel = "./" + _res.substr(_cwd.length()); } } +#else + std::optional cwd = getCurrentWorkingDirectory(); #endif REQUIRE_MESSAGE(cwd, "Error getting Luau path"); std::replace((*cwd).begin(), (*cwd).end(), '\\', '/');