mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-02-02 22:07:13 +08:00
👷 do not suppress return code of system
function
This commit is contained in:
parent
e058ea6936
commit
0ead58d906
@ -80,8 +80,8 @@ void exec(const std::vector<std::string>& vec) noexcept {
|
||||
// https://github.com/hniksic/rust-subprocess
|
||||
std::string exec(const std::string_view& command, const bool& interactive) noexcept {
|
||||
if (interactive) {
|
||||
system(command.data());
|
||||
return {};
|
||||
const auto& ret_code = system(command.data());
|
||||
return std::to_string(ret_code);
|
||||
}
|
||||
|
||||
auto* pipe = popen(command.data(), "r");
|
||||
|
Loading…
Reference in New Issue
Block a user