Skip to content

Commit 13798d2

Browse files
shriteshandrewrk
authored andcommitted
pass exec_path to zig run
1 parent 666e879 commit 13798d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,14 +1144,15 @@ int main(int argc, char **argv) {
11441144
codegen_print_timing_report(g, stdout);
11451145

11461146
if (cmd == CmdRun) {
1147+
const char *exec_path = buf_ptr(&g->output_file_path);
11471148
ZigList<const char*> args = {0};
1149+
1150+
args.append(exec_path);
11481151
if (runtime_args_start != -1) {
11491152
for (int i = runtime_args_start; i < argc; ++i) {
11501153
args.append(argv[i]);
11511154
}
11521155
}
1153-
1154-
const char *exec_path = buf_ptr(&g->output_file_path);
11551156
args.append(nullptr);
11561157

11571158
os_execv(exec_path, args.items);

0 commit comments

Comments
 (0)