Skip to content

Commit 920403d

Browse files
committed
fix: close Linux replay session before reset
1 parent 559f00c commit 920403d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎test/integration/linux-e2e/live-runner.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ async function runCommandDiscoveryEvidence(context: LinuxContext): Promise<void>
106106
assert.equal(replay.json?.data?.sessionActive, true, JSON.stringify(replay.json));
107107
assert.equal(typeof replay.json?.data?.session, 'string', JSON.stringify(replay.json));
108108
context.session = replay.json.data.session;
109+
context.sessionOpen = true;
109110
verifyCommand(context, C.replay, 'the Linux command-evidence script passes through replay');
110111
}
111112

@@ -233,7 +234,7 @@ async function finalize(context: LinuxContext): Promise<unknown> {
233234
}
234235

235236
async function closeIfOpen(context: LinuxContext): Promise<void> {
236-
if (!(await sessionExists(context))) return;
237+
if (!context.sessionOpen && !(await sessionExists(context))) return;
237238
await runStep(context, 'close the Linux command-evidence session', ['close']);
238239
}
239240

0 commit comments

Comments
 (0)