mirror of
https://github.com/Mr-Wiseguy/N64Recomp.git
synced 2025-01-14 10:35:21 +00:00
Show error when zip command is not found by linux (#94)
* Show error when zip command is not found by linux * Exit on linux if zip command is not found
This commit is contained in:
parent
d5ab74220d
commit
d33d381617
|
@ -4,6 +4,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <cstdlib>
|
||||||
#include "fmt/format.h"
|
#include "fmt/format.h"
|
||||||
#include "fmt/ostream.h"
|
#include "fmt/ostream.h"
|
||||||
#include "n64recomp.h"
|
#include "n64recomp.h"
|
||||||
|
@ -973,7 +974,10 @@ bool create_mod_zip(const std::filesystem::path& output_dir, const ModConfig& co
|
||||||
}
|
}
|
||||||
else if (pid == 0) {
|
else if (pid == 0) {
|
||||||
// This is the child process, so exec zip with the arguments.
|
// This is the child process, so exec zip with the arguments.
|
||||||
execvp(arg_pointers[0], arg_pointers.data());
|
if (execvp(arg_pointers[0], arg_pointers.data()) == -1) {
|
||||||
|
fmt::print(stderr, "Failed to run \"zip\" ({})\n", errno);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// This is the parent process, so wait for the child process to complete and check its exit code.
|
// This is the parent process, so wait for the child process to complete and check its exit code.
|
||||||
|
|
Loading…
Reference in a new issue