Skip to content

Commit 2a2620e

Browse files
nodejs-github-botmarco-ippolito
authored andcommitted
deps: update googletest to 34ad51b
PR-URL: #53157 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c01ce60 commit 2a2620e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deps/googletest/src/gtest.cc

+5-2
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,14 @@ ::std::vector<std::string> GetArgvs() {
661661
FilePath GetCurrentExecutableName() {
662662
FilePath result;
663663

664+
auto args = GetArgvs();
665+
if (!args.empty()) {
664666
#if defined(GTEST_OS_WINDOWS) || defined(GTEST_OS_OS2)
665-
result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
667+
result.Set(FilePath(args[0]).RemoveExtension("exe"));
666668
#else
667-
result.Set(FilePath(GetArgvs()[0]));
669+
result.Set(FilePath(args[0]));
668670
#endif // GTEST_OS_WINDOWS
671+
}
669672

670673
return result.RemoveDirectoryName();
671674
}

0 commit comments

Comments
 (0)