Skip to content

Commit

Permalink
Allow missing “assets” key in sea-config.json
Browse files Browse the repository at this point in the history
The current tests break because they are missing the *assets* field.
  • Loading branch information
pipobscure authored Jan 8, 2024
1 parent 68e281a commit a1d3672
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/node_sea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,7 @@ std::optional<SeaConfig> ParseSingleExecutableConfig(

std::optional<std::unordered_map<std::string, std::string>> assets_opt =
parser.GetTopLevelDictOfStrings("assets");
if (!assets_opt.has_value()) {
FPrintF(stderr,
"\"assets\" field of %s is not a map of strings\n",
config_path);
return std::nullopt;
} else if (!assets_opt.value().empty()) {
if (assets_opt.has_value() && !assets_opt.value().empty()) {
result.flags |= SeaFlags::kIncludeAssets;
result.assets = std::move(assets_opt.value());
}
Expand Down

0 comments on commit a1d3672

Please sign in to comment.