mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:08:26 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
let activeStream: NodeJS.WriteStream | null = null;
|
||||
|
||||
export function registerActiveProgressLine(stream: NodeJS.WriteStream): void {
|
||||
if (!stream.isTTY) return;
|
||||
if (!stream.isTTY) {
|
||||
return;
|
||||
}
|
||||
activeStream = stream;
|
||||
}
|
||||
|
||||
export function clearActiveProgressLine(): void {
|
||||
if (!activeStream?.isTTY) return;
|
||||
if (!activeStream?.isTTY) {
|
||||
return;
|
||||
}
|
||||
activeStream.write("\r\x1b[2K");
|
||||
}
|
||||
|
||||
export function unregisterActiveProgressLine(stream?: NodeJS.WriteStream): void {
|
||||
if (!activeStream) return;
|
||||
if (stream && activeStream !== stream) return;
|
||||
if (!activeStream) {
|
||||
return;
|
||||
}
|
||||
if (stream && activeStream !== stream) {
|
||||
return;
|
||||
}
|
||||
activeStream = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user