Skip to content

Commit

Permalink
Move debug command line line after opening the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Aug 21, 2024
1 parent b49fe93 commit c6d29a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,6 @@ int main(int argc, char *argv[]) {
}
}

msg_debug("$ "); // Record command line when debugging
for(int i = 0; i < argc; i++)
msg_debug("%s%c", str_ccsharg(argv[i]), i == argc - 1? '\n': ' ');

if(logfile != NULL) {
FILE *newstderr = freopen(logfile, "w", stderr);

Expand All @@ -942,6 +938,10 @@ int main(int argc, char *argv[]) {
}
}

msg_debug("$ "); // Record command line
for(int i = 0; i < argc; i++)
msg_debug("%s%c", str_ccsharg(argv[i]), i == argc - 1? '\n': ' ');

size_t ztest;

if(1 != sscanf("42", "%zi", &ztest) || ztest != 42)
Expand Down

0 comments on commit c6d29a1

Please sign in to comment.