]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Reset color before we exit (#11205)
authorEric Curtin <redacted>
Sun, 12 Jan 2025 18:23:10 +0000 (18:23 +0000)
committerGitHub <redacted>
Sun, 12 Jan 2025 18:23:10 +0000 (18:23 +0000)
We don't want colors to leak post termination of llama-run.

Signed-off-by: Eric Curtin <redacted>
examples/run/run.cpp

index bfa8378bbaebf0a3057e0e88f0536de5f861d88c..0ad8bb15b27fbc8d5693594341df765d76fcd9ae 100644 (file)
@@ -29,7 +29,7 @@
 
 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(_WIN32)
 [[noreturn]] static void sigint_handler(int) {
-    printf("\n");
+    printf("\n\033[0m");
     exit(0);  // not ideal, but it's the only way to guarantee exit in all cases
 }
 #endif