Skip to content

Commit

Permalink
Merge pull request #20805 from xdBronch/lang-flag
Browse files Browse the repository at this point in the history
handle -x language flag without spaces
  • Loading branch information
alexrp authored Oct 3, 2024
2 parents e22d79d + 6319805 commit f99097e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1703,8 +1703,11 @@ fn buildOutputType(
try cc_argv.append(arena, arg);
} else if (mem.startsWith(u8, arg, "-I")) {
try cssan.addIncludePath(arena, &cc_argv, .I, arg, arg[2..], true);
} else if (mem.eql(u8, arg, "-x")) {
const lang = args_iter.nextOrFatal();
} else if (mem.startsWith(u8, arg, "-x")) {
const lang = if (arg.len == "-x".len)
args_iter.nextOrFatal()
else
arg["-x".len..];
if (mem.eql(u8, lang, "none")) {
file_ext = null;
} else if (Compilation.LangToExt.get(lang)) |got_ext| {
Expand Down

0 comments on commit f99097e

Please sign in to comment.