Skip to content

Commit

Permalink
Prevent view cmd from launching browser for crash reports (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjduffy authored Aug 12, 2023
1 parent 2b5bed3 commit bea163a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/replay/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,15 +560,22 @@ async function doViewRecording(
agent?: any
) {
let recordingId;
if (recording.status == "uploaded") {
if (recording.status === "crashUploaded") {
maybeLog(verbose, "Crash report already uploaded");
return true;
} else if (recording.status == "uploaded") {
recordingId = recording.recordingId;
server = recording.server!;
} else {
recordingId = await doUploadRecording(dir, server, recording, verbose, apiKey, agent);

if (!recordingId) {
return false;
} else if (recording.status === "crashed") {
return true;
}
}

const dispatch = server != "wss://dispatch.replay.io" ? `&dispatch=${server}` : "";
spawn(openExecutable(), [`https://app.replay.io?id=${recordingId}${dispatch}`]);
return true;
Expand Down

0 comments on commit bea163a

Please sign in to comment.