Skip to content

Commit

Permalink
fix quoting (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli authored Jan 31, 2023
1 parent bdb57bd commit f6d10d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ static void run_linker(const char *objpath, const char *exepath, const CommandLi
sprintf(gcc, "%s\\mingw64\\bin\\gcc.exe", instdir);
if (stat(gcc, &(struct stat){0}) != -1) {
// The Windows builds come with the GNU linker.
// TODO: figure out how to quote gcc path
sprintf(command, "%s \"%s\" -o \"%s\"", gcc, objpath, exepath);
// Windows quoting is weird, in this command it strips the outermost quotes.
sprintf(command, "\"\"%s\" \"%s\" -o \"%s\"\"", gcc, objpath, exepath);
} else {
// Use clang from PATH. Convenient when developing Jou locally.
sprintf(command, "clang \"%s\" -o \"%s\"", objpath, exepath);
Expand Down

0 comments on commit f6d10d7

Please sign in to comment.