From c5ecd8dde29306709681a3c13351e136841ec130 Mon Sep 17 00:00:00 2001 From: GorouFlex <98001973+gorouflex@users.noreply.github.com> Date: Thu, 29 Feb 2024 23:25:43 +0700 Subject: [PATCH] fix --- UXTU4Mac/UXTU4Mac.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UXTU4Mac/UXTU4Mac.py b/UXTU4Mac/UXTU4Mac.py index 9128690..39f0e28 100644 --- a/UXTU4Mac/UXTU4Mac.py +++ b/UXTU4Mac/UXTU4Mac.py @@ -512,7 +512,8 @@ def welcome_tutorial(): logging.info("Incorrect sudo password. Please try again.") current_dir = os.path.dirname(os.path.realpath(__file__)) command_file = os.path.join(current_dir, 'UXTU4Mac.command') - check_command = f"osascript -e 'tell application \"System Events\" to get the name of every login item' | grep {command_file}" + command_file_name = os.path.basename(command_file) + check_command = f"osascript -e 'tell application \"System Events\" to get the name of every login item' | grep {command_file_name}" login_enabled = subprocess.call(check_command, shell=True, stdout=subprocess.DEVNULL) == 0 if not login_enabled: start_with_macos = input("Do you want this script to start with macOS? (Login Items) (y/n): ").lower()