diff --git a/common/common.cc b/common/common.cc index 70c2160ff..a7a122313 100644 --- a/common/common.cc +++ b/common/common.cc @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -89,9 +90,7 @@ bool sorbet::FileOps::ensureDir(string_view path) { } std::string sorbet::FileOps::getCurrentDir() { - char buf[MAXPATHLEN + 1]; - getcwd(buf, sizeof(buf)); - return std::string(buf); + return std::filesystem::current_path(); } void sorbet::FileOps::removeDir(string_view path) {