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(), '\\', '/');