From 40e4957c4612544dac30625626485a9b47376630 Mon Sep 17 00:00:00 2001 From: BowDown097 <42720004+BowDown097@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:09:33 -0700 Subject: [PATCH] Fix unsafe access to PATH --- auto_cpufreq/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index e79daaa..46fe0b4 100755 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -22,7 +22,7 @@ from auto_cpufreq.power_helper import * filterwarnings("ignore") # add path to auto-cpufreq executables for GUI -os.environ["PATH"] += ":/usr/local/bin" +os.environ["PATH"] = os.environ.get("PATH", "") + os.pathsep + "/usr/local/bin" # ToDo: # - replace get system/CPU load from: psutil.getloadavg() | available in 5.6.2) @@ -896,4 +896,4 @@ def not_running_daemon_check(): exit(1) elif IS_INSTALLED_WITH_SNAP and dcheck == "disabled": daemon_not_running_msg() - exit(1) \ No newline at end of file + exit(1)