Skip to content

Commit 14eefb7

Browse files
committed
fix: Modify initial parse to work with json 3.11 for rhel
Signed-off-by: Nimalan <nimalan.m@protonmail.com>
1 parent faa0725 commit 14eefb7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

app/parse_v2.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//-*-C++-*-
22

33
#include "v2.h"
4-
#include <optional>
54

65
void set_loglevel(std::string level)
76
{
@@ -159,15 +158,11 @@ int main(int argc, char* argv[]) {
159158
LOG_F(INFO, "No output file found, defaulting to %s", ofile.c_str());
160159
}
161160

162-
if (result.count("password")) {
163-
password = result["password"].as<std::string>();
164-
} else {
165-
password = std::nullopt;
166-
}
167-
168161
auto config = create_config(ifile, ofile, page);
169162
LOG_S(INFO) << "config: \n" << config.dump(2);
170-
config["password"] = password;
163+
if (result.count("password")) {
164+
config["password"] = result["password"].as<std::string>();
165+
}
171166

172167
utils::timer timer;
173168

0 commit comments

Comments
 (0)