From 4905c9417affc6103b0f7ab456ba88fbf09c8b67 Mon Sep 17 00:00:00 2001 From: Harshit Vijay Date: Sat, 21 Sep 2024 10:59:12 +0530 Subject: [PATCH] shutil.which To eliminate deprecation warning --- thefuck/system/unix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thefuck/system/unix.py b/thefuck/system/unix.py index 9ae01cf4..c3385983 100644 --- a/thefuck/system/unix.py +++ b/thefuck/system/unix.py @@ -3,7 +3,7 @@ import sys import tty import termios import colorama -from distutils.spawn import find_executable +from shutil import which from .. import const init_output = colorama.init @@ -38,7 +38,7 @@ def get_key(): def open_command(arg): - if find_executable('xdg-open'): + if which('xdg-open'): return 'xdg-open ' + arg return 'open ' + arg