authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2023-10-14 23:29:34-07:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2023-10-15 13:33:16-07:00
logb51147889f1c44d380818977a4dbefebffb8d91f
tree04bf22a169367815892862e1f96a4f7a2fd009fc
parent5f15acc463d39baedd8de367330286b91c8bafc8

Add warning if .xml file is used, since it's likely intended to be a Windows manifest file

Example: > zig build-exe test.zig test.xml warning: embedded manifest files must have the extension '.manifest' error: unrecognized file extension of parameter 'test.xml'

1 files changed, 3 insertions(+), 0 deletions(-)

src/main.zig+3
...@@ -1653,6 +1653,9 @@ fn buildOutputType(...@@ -1653,6 +1653,9 @@ fn buildOutputType(
1653 } else root_src_file = arg;1653 } else root_src_file = arg;
1654 },1654 },
1655 .def, .unknown => {1655 .def, .unknown => {
1656 if (std.ascii.eqlIgnoreCase(".xml", std.fs.path.extension(arg))) {
1657 std.log.warn("embedded manifest files must have the extension '.manifest'", .{});
1658 }
1656 fatal("unrecognized file extension of parameter '{s}'", .{arg});1659 fatal("unrecognized file extension of parameter '{s}'", .{arg});
1657 },1660 },
1658 }1661 }