Exit on linux if zip command is not found

This commit is contained in:
LittleCube 2024-09-11 03:00:37 -04:00
parent dbf81349ff
commit 2a2240da9a

View file

@ -4,6 +4,7 @@
#include <iostream>
#include <numeric>
#include <cctype>
#include <cstdlib>
#include "fmt/format.h"
#include "fmt/ostream.h"
#include "n64recomp.h"
@ -975,6 +976,7 @@ bool create_mod_zip(const std::filesystem::path& output_dir, const ModConfig& co
// This is the child process, so exec zip with the arguments.
if (execvp(arg_pointers[0], arg_pointers.data()) == -1) {
fmt::print(stderr, "Failed to run \"zip\" ({})\n", errno);
exit(-1);
}
}
else {