Skip to content

Commit 75aaa3b

Browse files
committed
src: remove temporary string in the parsing of --snapshot-config
1 parent 3b4f9b2 commit 75aaa3b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/node_snapshotable.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,15 +935,13 @@ std::optional<SnapshotConfig> ReadSnapshotConfig(const char* config_path) {
935935
return std::nullopt;
936936
}
937937
if (key == "builder") {
938-
std::string builder_path;
939-
if (field.value().get_string().get(builder_path) ||
940-
builder_path.empty()) {
938+
if (field.value().get_string().get(result.builder_script_path) ||
939+
result.builder_script_path.empty()) {
941940
FPrintF(stderr,
942941
"\"builder\" field of %s is not a non-empty string\n",
943942
config_path);
944943
return std::nullopt;
945944
}
946-
result.builder_script_path = builder_path;
947945
} else if (key == "withoutCodeCache") {
948946
bool without_code_cache_value = false;
949947
if (field.value().get_bool().get(without_code_cache_value)) {

0 commit comments

Comments
 (0)