Skip to content

Commit 09bcf25

Browse files
Add a way to print the full command line being executed by the launcher
Signed-off-by: Jean-Christophe Morin <[email protected]>
1 parent 5517970 commit 09bcf25

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

.github/workflows/wheel.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ jobs:
8585
set -ex
8686
cat .venv/Scripts/rez/rez-script.py
8787
cat .venv/Scripts/rez/jctest-script.py
88+
export REZ_LAUNCHER_DEBUG=1
89+
8890
jctest
8991
9092
rez --help

launcher/remote-appended.patch

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
diff --git a/launcher.c b/launcher.c
2-
index 727f7916..2447d378 100644
3-
--- a/launcher.c
4-
+++ b/launcher.c
5-
@@ -35,8 +35,6 @@
6-
7-
#pragma comment (lib, "Shlwapi.lib")
8-
9-
-#define APPENDED_ARCHIVE
10-
-#define USE_ENVIRONMENT
11-
#define SUPPORT_RELATIVE_PATH
12-
13-
#define MSGSIZE 1024
14-
1+
diff --git a/launcher.c b/launcher.c
2+
index 727f7916..431e0339 100644
3+
--- a/launcher.c
4+
+++ b/launcher.c
5+
@@ -35,8 +35,6 @@
6+
7+
#pragma comment (lib, "Shlwapi.lib")
8+
9+
-#define APPENDED_ARCHIVE
10+
-#define USE_ENVIRONMENT
11+
#define SUPPORT_RELATIVE_PATH
12+
13+
#define MSGSIZE 1024
14+
@@ -822,6 +820,13 @@ run_child(wchar_t * cmdline)
15+
#endif
16+
si.dwFlags |= STARTF_USESTDHANDLES;
17+
}
18+
+
19+
+ size_t rez_envvar_size = 0;
20+
+ getenv_s(&rez_envvar_size, NULL, 0, "REZ_LAUNCHER_DEBUG");
21+
+ if (rez_envvar_size > 0) {
22+
+ printf("Launching: %ls\n", cmdline);
23+
+ }
24+
+
25+
ok = CreateProcessW(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &child_process_info);
26+
if (!ok) {
27+
// Failed to create process. See if we can find out why.

0 commit comments

Comments
 (0)