Skip to content

Commit f4f6b6b

Browse files
committed
src,test: update snapshot failure in node.cc and associated test
1 parent 7b22b42 commit f4f6b6b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/node.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,7 @@ ExitCode LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
11811181
FILE* fp = fopen(filename.c_str(), "rb");
11821182
if (fp == nullptr) {
11831183
fprintf(stderr, "Cannot open %s", filename.c_str());
1184-
// TODO(joyeecheung): should be kStartupSnapshotFailure.
1185-
exit_code = ExitCode::kGenericUserError;
1184+
exit_code = ExitCode::kStartupSnapshotFailure;
11861185
return exit_code;
11871186
}
11881187
std::unique_ptr<SnapshotData> read_data = std::make_unique<SnapshotData>();

test/parallel/test-snapshot-error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const entry = fixtures.path('snapshot', 'error.js');
4747
console.log(child.status);
4848
console.log(stderr);
4949
console.log(child.stdout.toString());
50-
assert.strictEqual(child.status, 1);
50+
assert.strictEqual(child.status, 14);
5151
assert.match(stderr, /Cannot open/);
5252
assert(!fs.existsSync(path.join(tmpdir.path, 'snapshot.blob')));
5353
}

0 commit comments

Comments
 (0)