From b9d8c82f19c08c07a0422a052609c4a8d2d35c1c Mon Sep 17 00:00:00 2001 From: Duo Developer Date: Fri, 28 Aug 2026 09:51:24 +0000 Subject: [PATCH] Remove unused temp dir variables that leaked on every invocation utils_dir, temp_dir, build_dir, and staging_dir were computed at module level but never referenced. tempfile.mkdtemp() ran unconditionally on every invocation (including --help and argument-parse errors), leaking an empty temp directory on disk each time. Remove all four variables and the now-unused tempfile import. --- scripts/clientappctl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/clientappctl b/scripts/clientappctl index 4800c223..aa854327 100755 --- a/scripts/clientappctl +++ b/scripts/clientappctl @@ -1,6 +1,6 @@ #! /usr/bin/env python3 -import sys, os, argparse, json, shutil, tempfile, subprocess, traceback +import sys, os, argparse, json, shutil, subprocess, traceback def run_script(script_path: str) -> int: """ @@ -131,10 +131,6 @@ def uninstall_app(args: argparse.Namespace, install_path) -> int: return rval # script constants -utils_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) -temp_dir = tempfile.mkdtemp() -build_dir = os.path.join(temp_dir, 'build') -staging_dir = os.path.join(temp_dir, 'staging') working_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) src_path = os.path.join(working_dir, 'src') CONFIG_JSON = os.path.join(working_dir, 'config.json')