Skip to content

Commit 1ab11a3

Browse files
authored
More reliable verbose path output (#1091)
1 parent 51ec25c commit 1ab11a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cppwinrt/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ Where <spec> is one or more of:
268268

269269
if (settings.verbose)
270270
{
271-
w.write(" tool: %\n", canonical(path(argv[0]).replace_extension("exe")).string());
271+
char* path = nullptr;
272+
_get_pgmptr(&path);
273+
w.write(" tool: %\n", path);
272274
w.write(" ver: %\n", CPPWINRT_VERSION_STRING);
273275

274276
for (auto&& file : settings.input)

0 commit comments

Comments
 (0)