Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gorouflex authored Feb 29, 2024
1 parent 393f12f commit c5ecd8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion UXTU4Mac/UXTU4Mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c5ecd8d

Please sign in to comment.