diff --git a/doc/api/embedding.md b/doc/api/embedding.md index 1a416f52c600de..cb225a1eb9dfe0 100644 --- a/doc/api/embedding.md +++ b/doc/api/embedding.md @@ -35,6 +35,7 @@ the `node` and `v8` C++ namespaces, respectively. ```cpp int main(int argc, char** argv) { + argv = uv_setup_args(argc, argv); std::vector args(argv, argv + argc); std::vector exec_args; std::vector errors; diff --git a/test/cctest/gtest/gtest_main.cc b/test/cctest/gtest/gtest_main.cc index 1ed4df287834d5..345044407a499a 100644 --- a/test/cctest/gtest/gtest_main.cc +++ b/test/cctest/gtest/gtest_main.cc @@ -28,6 +28,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include +#include #include "gtest.h" #ifdef ARDUINO @@ -40,6 +41,7 @@ void loop() { RUN_ALL_TESTS(); } #else GTEST_API_ int main(int argc, char **argv) { + argv = uv_setup_args(argc, argv); printf("Running main() from %s\n", __FILE__); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/test/embedding/embedtest.cc b/test/embedding/embedtest.cc index 21e5ac713ed017..21baadf93e5a26 100644 --- a/test/embedding/embedtest.cc +++ b/test/embedding/embedtest.cc @@ -24,6 +24,7 @@ static int RunNodeInstance(MultiIsolatePlatform* platform, const std::vector& exec_args); int main(int argc, char** argv) { + argv = uv_setup_args(argc, argv); std::vector args(argv, argv + argc); std::vector exec_args; std::vector errors;