Skip to content

Commit c3a327b

Browse files
Update update.sh
1 parent d581cd7 commit c3a327b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/api/routers/version.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { join } from "path";
44
import { spawn } from "child_process";
55
import { env } from "~/env";
66
import { existsSync, createWriteStream } from "fs";
7+
import stripAnsi from "strip-ansi";
78

89
interface GitHubRelease {
910
tag_name: string;
@@ -141,7 +142,9 @@ export const versionRouter = createTRPCRouter({
141142
}
142143

143144
const logs = await readFile(logPath, 'utf-8');
144-
const logLines = logs.split('\n').filter(line => line.trim());
145+
const logLines = logs.split('\n')
146+
.filter(line => line.trim())
147+
.map(line => stripAnsi(line)); // Strip ANSI color codes
145148

146149
// Check if update is complete by looking for completion indicators
147150
const isComplete = logLines.some(line =>

0 commit comments

Comments
 (0)