From 7fe652d9291a9fb26f130644039db4d44a308a5d Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Wed, 23 Apr 2025 20:07:17 -0400 Subject: [PATCH] fix(regen-defs): Fix globs and clean tempfiles on INT, TERM --- regen-defs.zsh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/regen-defs.zsh b/regen-defs.zsh index 07c1880..8203dc5 100755 --- a/regen-defs.zsh +++ b/regen-defs.zsh @@ -23,8 +23,14 @@ for folder in $folders; do stdout_file=$(mktemp) stderr_file=$(mktemp) + # Cleanup on interruption + cleanup() { + rm "$stdout_file" "$stderr_file" + } + trap cleanup INT TERM + # Execute the command and capture stdout and stderr - uv run "$cpplint" $cmd > "$stdout_file" 2> "$stderr_file" + eval uv run "$cpplint" $cmd > "$stdout_file" 2> "$stderr_file" ret_code=$? # Count the number of lines in stdout @@ -42,7 +48,7 @@ for folder in $folders; do } > "$file" # Clean up temporary files - rm "$stdout_file" "$stderr_file" + cleanup done cd .. done pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy